{"_id":"tree-dump","_rev":"4181447","name":"tree-dump","description":"Tree or binary tree printer, print any tree to terminal or debug window","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"streamich","email":""}],"time":{"modified":"2026-03-01T21:51:38.000Z","created":"2024-05-01T06:38:18.099Z","1.1.0":"2025-09-04T12:18:41.420Z","1.0.3":"2025-05-19T19:18:49.851Z","1.0.2":"2024-06-24T20:58:49.517Z","1.0.1":"2024-05-01T15:02:56.091Z","1.0.0":"2024-05-01T06:38:18.099Z"},"users":{},"author":{"name":"streamich","url":"https://github.com/streamich"},"repository":{"type":"git","url":"git+https://github.com/streamich/tree-dump.git"},"versions":{"1.1.0":{"name":"tree-dump","private":false,"publishConfig":{"access":"public"},"version":"1.1.0","description":"Tree or binary tree printer, print any tree to terminal or debug window","author":{"name":"streamich","url":"https://github.com/streamich"},"license":"Apache-2.0","homepage":"https://github.com/streamich/tree-dump","repository":{"type":"git","url":"git+https://github.com/streamich/tree-dump.git"},"funding":{"type":"github","url":"https://github.com/sponsors/streamich"},"keywords":["tree","print","dump","tree dump","print tree","binary tree","binary search tree"],"engines":{"node":">=10.0"},"main":"lib/index.js","types":"lib/index.d.ts","typings":"lib/index.d.ts","scripts":{"prettier":"npx prettier@3.2.5 --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"","prettier:check":"npx prettier@3.2.5 --ignore-path .gitignore --list-different 'src/**/*.{ts,tsx,js,jsx}'","lint":"npx tslint@6.1.3 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .","clean":"npx rimraf@5.0.5 lib typedocs coverage gh-pages yarn-error.log","build":"tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib","test":"jest --maxWorkers 7","test:ci":"jest --maxWorkers 3 --no-cache","coverage":"yarn test --collectCoverage","typedoc":"npx typedoc@0.25.12","build:pages":"npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","deploy:pages":"npx gh-pages -d gh-pages","publish-coverage-and-typedocs":"yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages"},"peerDependencies":{"tslib":"2"},"dependencies":{},"devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","ts-jest":"^29.1.2","tslib":"^2.6.2","tslint-config-common":"^1.6.2","typescript":"^5.4.4"},"jest":{"verbose":true,"moduleFileExtensions":["ts","js"],"transform":{"^.+\\.ts$":"ts-jest"},"transformIgnorePatterns":[],"testRegex":".*/(__tests__|__jest__|demo)/.*\\.(test|spec)\\.ts$"},"prettier":{"arrowParens":"always","printWidth":120,"tabWidth":2,"useTabs":false,"semi":true,"singleQuote":true,"trailingComma":"all","bracketSpacing":false},"release":{"branches":["master","next"]},"_id":"tree-dump@1.1.0","gitHead":"e8e2d3d8e846cb0a53a9f19b64e374c38bc01b05","bugs":{"url":"https://github.com/streamich/tree-dump/issues"},"_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"shasum":"ab29129169dc46004414f5a9d4a3c6e89f13e8a4","size":6424,"noattachment":false,"key":"/tree-dump/-/tree-dump-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tree-dump/download/tree-dump-1.1.0.tgz"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"directories":{},"maintainers":[{"name":"streamich","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tree-dump_1.1.0_1756988321237_0.1624369129703882"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-04T12:18:41.420Z","publish_time":1756988321420,"_source_registry_name":"default","_cnpm_publish_time":1756988321420},"1.0.3":{"name":"tree-dump","private":false,"publishConfig":{"access":"public"},"version":"1.0.3","description":"Tree or binary tree printer, print any tree to terminal or debug window","author":{"name":"streamich","url":"https://github.com/streamich"},"license":"Apache-2.0","homepage":"https://github.com/streamich/tree-dump","repository":{"type":"git","url":"git+https://github.com/streamich/tree-dump.git"},"funding":{"type":"github","url":"https://github.com/sponsors/streamich"},"keywords":["tree","print","dump","tree dump","print tree","binary tree","binary search tree"],"engines":{"node":">=10.0"},"main":"lib/index.js","types":"lib/index.d.ts","typings":"lib/index.d.ts","scripts":{"prettier":"npx prettier@3.2.5 --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"","prettier:check":"npx prettier@3.2.5 --ignore-path .gitignore --list-different 'src/**/*.{ts,tsx,js,jsx}'","lint":"npx tslint@6.1.3 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .","clean":"npx rimraf@5.0.5 lib typedocs coverage gh-pages yarn-error.log","build":"tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib","test":"jest --maxWorkers 7","test:ci":"jest --maxWorkers 3 --no-cache","coverage":"yarn test --collectCoverage","typedoc":"npx typedoc@0.25.12","build:pages":"npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","deploy:pages":"npx gh-pages -d gh-pages","publish-coverage-and-typedocs":"yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages"},"peerDependencies":{"tslib":"2"},"dependencies":{},"devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","ts-jest":"^29.1.2","tslib":"^2.6.2","tslint-config-common":"^1.6.2","typescript":"^5.4.4"},"jest":{"verbose":true,"moduleFileExtensions":["ts","js"],"transform":{"^.+\\.ts$":"ts-jest"},"transformIgnorePatterns":[],"testRegex":".*/(__tests__|__jest__|demo)/.*\\.(test|spec)\\.ts$"},"prettier":{"arrowParens":"always","printWidth":120,"tabWidth":2,"useTabs":false,"semi":true,"singleQuote":true,"trailingComma":"all","bracketSpacing":false},"release":{"branches":["master","next"]},"_id":"tree-dump@1.0.3","gitHead":"976e0a2384a0f7692fe448108fe4cc10500d4f69","bugs":{"url":"https://github.com/streamich/tree-dump/issues"},"_nodeVersion":"20.19.1","_npmVersion":"10.8.2","dist":{"shasum":"2f0e42e77354714418ed7ab44291e435ccdb0f80","size":6264,"noattachment":false,"key":"/tree-dump/-/tree-dump-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/tree-dump/download/tree-dump-1.0.3.tgz"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"directories":{},"maintainers":[{"name":"streamich","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tree-dump_1.0.3_1747682329657_0.9347230412467711"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-05-19T19:18:49.851Z","publish_time":1747682329851,"_source_registry_name":"default","_cnpm_publish_time":1747682329851},"1.0.2":{"name":"tree-dump","private":false,"publishConfig":{"access":"public"},"version":"1.0.2","description":"High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)","author":{"name":"streamich","url":"https://github.com/streamich"},"license":"Apache-2.0","homepage":"https://github.com/streamich/tree-dump","repository":{"type":"git","url":"git+https://github.com/streamich/tree-dump.git"},"funding":{"type":"github","url":"https://github.com/sponsors/streamich"},"keywords":["tree","print","dump","tree dump","print tree","binary tree","binary search tree"],"engines":{"node":">=10.0"},"main":"lib/index.js","types":"lib/index.d.ts","typings":"lib/index.d.ts","scripts":{"prettier":"npx prettier@3.2.5 --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"","prettier:check":"npx prettier@3.2.5 --ignore-path .gitignore --list-different 'src/**/*.{ts,tsx,js,jsx}'","lint":"npx tslint@6.1.3 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .","clean":"npx rimraf@5.0.5 lib typedocs coverage gh-pages yarn-error.log","build":"tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib","test":"jest --maxWorkers 7","test:ci":"jest --maxWorkers 3 --no-cache","coverage":"yarn test --collectCoverage","typedoc":"npx typedoc@0.25.12","build:pages":"npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","deploy:pages":"npx gh-pages -d gh-pages","publish-coverage-and-typedocs":"yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages"},"peerDependencies":{"tslib":"2"},"dependencies":{},"devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","ts-jest":"^29.1.2","tslib":"^2.6.2","tslint-config-common":"^1.6.2","typescript":"^5.4.4"},"jest":{"verbose":true,"moduleFileExtensions":["ts","js"],"transform":{"^.+\\.ts$":"ts-jest"},"transformIgnorePatterns":[],"testRegex":".*/(__tests__|__jest__|demo)/.*\\.(test|spec)\\.ts$"},"prettier":{"arrowParens":"always","printWidth":120,"tabWidth":2,"useTabs":false,"semi":true,"singleQuote":true,"trailingComma":"all","bracketSpacing":false},"release":{"branches":["master","next"]},"_id":"tree-dump@1.0.2","gitHead":"208ee227b6720735fe815c3f70391290c6c4187c","bugs":{"url":"https://github.com/streamich/tree-dump/issues"},"_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"shasum":"c460d5921caeb197bde71d0e9a7b479848c5b8ac","size":6290,"noattachment":false,"key":"/tree-dump/-/tree-dump-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/tree-dump/download/tree-dump-1.0.2.tgz"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tree-dump_1.0.2_1719262729364_0.6343536759459145"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-06-24T20:58:49.517Z","publish_time":1719262729517,"_source_registry_name":"default","maintainers":[{"name":"streamich","email":""}],"_cnpm_publish_time":1719262729517},"1.0.1":{"name":"tree-dump","private":false,"publishConfig":{"access":"public"},"version":"1.0.1","description":"High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)","author":{"name":"streamich","url":"https://github.com/streamich"},"homepage":"https://github.com/streamich/tree-dump","repository":{"type":"git","url":"git+https://github.com/streamich/tree-dump.git"},"funding":{"type":"github","url":"https://github.com/sponsors/streamich"},"keywords":["tree","print","dump","tree dump","print tree","binary tree","binary search tree"],"engines":{"node":">=10.0"},"main":"lib/index.js","types":"lib/index.d.ts","typings":"lib/index.d.ts","scripts":{"prettier":"npx prettier@3.2.5 --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"","prettier:check":"npx prettier@3.2.5 --ignore-path .gitignore --list-different 'src/**/*.{ts,tsx,js,jsx}'","lint":"npx tslint@6.1.3 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .","clean":"npx rimraf@5.0.5 lib typedocs coverage gh-pages yarn-error.log","build":"tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib","test":"jest --maxWorkers 7","test:ci":"jest --maxWorkers 3 --no-cache","coverage":"yarn test --collectCoverage","typedoc":"npx typedoc@0.25.12","build:pages":"npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","deploy:pages":"npx gh-pages -d gh-pages","publish-coverage-and-typedocs":"yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages"},"peerDependencies":{"tslib":"2"},"dependencies":{},"devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","ts-jest":"^29.1.2","tslib":"^2.6.2","tslint-config-common":"^1.6.2","typescript":"^5.4.4"},"jest":{"verbose":true,"moduleFileExtensions":["ts","js"],"transform":{"^.+\\.ts$":"ts-jest"},"transformIgnorePatterns":[],"testRegex":".*/(__tests__|__jest__|demo)/.*\\.(test|spec)\\.ts$"},"prettier":{"arrowParens":"always","printWidth":120,"tabWidth":2,"useTabs":false,"semi":true,"singleQuote":true,"trailingComma":"all","bracketSpacing":false},"release":{"branches":["master","next"]},"_id":"tree-dump@1.0.1","gitHead":"58984f5c70ef04bf11849b6c717cc00d92fd41ef","bugs":{"url":"https://github.com/streamich/tree-dump/issues"},"_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"shasum":"b448758da7495580e6b7830d6b7834fca4c45b96","size":2333,"noattachment":false,"key":"/tree-dump/-/tree-dump-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tree-dump/download/tree-dump-1.0.1.tgz"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"directories":{},"maintainers":[{"name":"streamich","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tree-dump_1.0.1_1714575775905_0.24686846673802787"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-01T15:02:56.091Z","publish_time":1714575776091,"_source_registry_name":"default","_cnpm_publish_time":1714575776091},"1.0.0":{"name":"tree-dump","private":false,"publishConfig":{"access":"public"},"version":"1.0.0","description":"High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)","author":{"name":"streamich","url":"https://github.com/streamich"},"homepage":"https://github.com/streamich/tree-dump","repository":{"type":"git","url":"git+https://github.com/streamich/tree-dump.git"},"funding":{"type":"github","url":"https://github.com/sponsors/streamich"},"keywords":["tree","print","dump","tree dump","print tree","binary tree","binary search tree"],"engines":{"node":">=10.0"},"main":"lib/index.js","types":"lib/index.d.ts","typings":"lib/index.d.ts","scripts":{"prettier":"npx prettier@3.2.5 --ignore-path .gitignore --write \"src/**/*.{ts,tsx,js,jsx}\"","prettier:check":"npx prettier@3.2.5 --ignore-path .gitignore --list-different 'src/**/*.{ts,tsx,js,jsx}'","lint":"npx tslint@6.1.3 'src/**/*.{js,jsx,ts,tsx}' -t verbose --project .","clean":"npx rimraf@5.0.5 lib typedocs coverage gh-pages yarn-error.log","build":"tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib","test":"jest --maxWorkers 7","test:ci":"jest --maxWorkers 3 --no-cache","coverage":"yarn test --collectCoverage","typedoc":"npx typedoc@0.25.12","build:pages":"npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","deploy:pages":"npx gh-pages -d gh-pages","publish-coverage-and-typedocs":"yarn typedoc && yarn coverage && yarn build:pages && yarn deploy:pages"},"peerDependencies":{"tslib":"2"},"dependencies":{},"devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","ts-jest":"^29.1.2","tslib":"^2.6.2","tslint-config-common":"^1.6.2","typescript":"^5.4.4"},"jest":{"verbose":true,"moduleFileExtensions":["ts","js"],"transform":{"^.+\\.ts$":"ts-jest"},"transformIgnorePatterns":[],"testRegex":".*/(__tests__|__jest__|demo)/.*\\.(test|spec)\\.ts$"},"prettier":{"arrowParens":"always","printWidth":120,"tabWidth":2,"useTabs":false,"semi":true,"singleQuote":true,"trailingComma":"all","bracketSpacing":false},"release":{"branches":["master","next"]},"_id":"tree-dump@1.0.0","gitHead":"29273ea867b8a92a218e2e86cf0bb1c063db3bf9","bugs":{"url":"https://github.com/streamich/tree-dump/issues"},"_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"shasum":"bd5fdece2b36d888ae0d1cf316e653af3de656ea","size":2308,"noattachment":false,"key":"/tree-dump/-/tree-dump-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tree-dump/download/tree-dump-1.0.0.tgz"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"directories":{},"maintainers":[{"name":"streamich","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tree-dump_1.0.0_1714545497945_0.911905879003652"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-01T06:38:18.099Z","publish_time":1714545498099,"_source_registry_name":"default","_cnpm_publish_time":1714545498099}},"readme":"# `tree-dump`\n\nPrints a tree structure to the console. Can print a binary tree or a tree with any number of children.\n\n## Usage\n\nInstall\n\n```\nnpm install tree-dump\n```\n\nPrint a non-binary tree\n\n```js\nimport {printTree} from 'tree-dump';\n\nconst str = 'start' + printTree('', [\n  (tab) => 'line 1',\n  () => '',\n  (tab) => 'line 2' + printTree(tab, [\n    (tab) => 'line 2.1',\n    (tab) => 'line 2.2',\n  ])\n  (tab) => 'line 3',\n]);\n\nconsole.log(str);\n// start\n// ├── line 1\n// │\n// ├── line 2\n// │   ├── line 2.1\n// │   └── line 2.2\n// └── line 3\n```\n\nPrint a binary tree\n\n```js\nimport {printBinary} from 'tree-dump';\n\nconst str =\n  'Node' +\n  printBinary('', [\n    (tab) => 'left' + printBinary(tab, [\n      () => 'left 1',\n      () => 'right 1',\n    ]),\n    (tab) => 'right' + printBinary(tab, [\n      () => 'left 2',\n      () => 'right 2',\n    ]),\n  ]);\n\nconsole.log(str);\n// Node\n// ← left\n//   ← left 1\n//   → right 1\n// → right\n//   ← left 2\n//   → right 2\n```\n","_attachments":{},"homepage":"https://github.com/streamich/tree-dump","bugs":{"url":"https://github.com/streamich/tree-dump/issues"},"license":"Apache-2.0"}