{"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":{"integrity":"sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==","shasum":"c460d5921caeb197bde71d0e9a7b479848c5b8ac","tarball":"http://registry-npm.ywwl.com/tree-dump/download/tree-dump-1.0.2.tgz","fileCount":11,"unpackedSize":16890,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq6le8dLoNJiXaS7V+AExUJWEpIUjNtekFAeBVIligBgIgJnoZorUS3gw1K/bjmbs3WvCgVlB9vQQmnZzktZ5GLcU="}],"size":6290,"noattachment":false,"key":"/tree-dump/-/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,"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","publish_time":1719262729517,"maintainers":[{"name":"streamich","email":"vadimsdaleckis@gmail.com"}],"_cnpm_publish_time":1719262729517,"dist-tags":{"latest":"1.1.0"}}