node-ejs-renderer/node_modules/tree-dump/lib/printBinary.js
2024-06-09 13:55:01 -04:00

14 lines
416 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printBinary = void 0;
const printBinary = (tab = '', children) => {
const left = children[0], right = children[1];
let str = '';
if (left)
str += '\n' + tab + '← ' + left(tab + ' ');
if (right)
str += '\n' + tab + '→ ' + right(tab + ' ');
return str;
};
exports.printBinary = printBinary;