{"id":30180923,"url":"https://github.com/streamich/tree-dump","last_synced_at":"2025-08-12T08:06:15.726Z","repository":{"id":237384403,"uuid":"794432346","full_name":"streamich/tree-dump","owner":"streamich","description":"Simple console tree printing helpers","archived":false,"fork":false,"pushed_at":"2025-07-22T11:33:58.000Z","size":373,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T17:54:18.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"streamich"}},"created_at":"2024-05-01T06:29:09.000Z","updated_at":"2025-07-31T17:49:21.000Z","dependencies_parsed_at":"2024-07-08T04:30:23.633Z","dependency_job_id":"89037281-40ba-4011-ac8d-efe6d26e8573","html_url":"https://github.com/streamich/tree-dump","commit_stats":null,"previous_names":["streamich/tree-dump"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/streamich/tree-dump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Ftree-dump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Ftree-dump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Ftree-dump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Ftree-dump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamich","download_url":"https://codeload.github.com/streamich/tree-dump/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Ftree-dump/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270024697,"owners_count":24514054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-12T08:06:07.391Z","updated_at":"2025-08-12T08:06:15.710Z","avatar_url":"https://github.com/streamich.png","language":"TypeScript","funding_links":["https://github.com/sponsors/streamich"],"categories":[],"sub_categories":[],"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) =\u003e 'line 1',\n  () =\u003e '',\n  (tab) =\u003e 'line 2' + printTree(tab, [\n    (tab) =\u003e 'line 2.1',\n    (tab) =\u003e 'line 2.2',\n  ])\n  (tab) =\u003e '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) =\u003e 'left' + printBinary(tab, [\n      () =\u003e 'left 1',\n      () =\u003e 'right 1',\n    ]),\n    (tab) =\u003e 'right' + printBinary(tab, [\n      () =\u003e 'left 2',\n      () =\u003e '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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Ftree-dump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamich%2Ftree-dump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Ftree-dump/lists"}