printBinary.js 430 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.printBinary = void 0;
  4. const printBinary = (tab = '', children) => {
  5. const [left, right] = children;
  6. let str = '';
  7. if (left)
  8. str += `\n${tab}← ${left(tab + ' ')}`;
  9. if (right)
  10. str += `\n${tab}→ ${right(tab + ' ')}`;
  11. return str;
  12. };
  13. exports.printBinary = printBinary;
  14. //# sourceMappingURL=printBinary.js.map