{"id":13431754,"url":"https://github.com/notatestuser/treeify","last_synced_at":"2025-03-16T12:31:17.661Z","repository":{"id":4868103,"uuid":"6023016","full_name":"notatestuser/treeify","owner":"notatestuser","description":"Pretty-print a javascript object as a tree","archived":false,"fork":false,"pushed_at":"2024-10-07T04:26:03.000Z","size":31,"stargazers_count":244,"open_issues_count":6,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-09T17:03:06.925Z","etag":null,"topics":["console","javascript","pretty-print","terminal","tree","treeify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"belbis/dynamizer","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/notatestuser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-30T22:24:38.000Z","updated_at":"2025-02-14T23:23:12.000Z","dependencies_parsed_at":"2022-09-06T05:01:32.213Z","dependency_job_id":null,"html_url":"https://github.com/notatestuser/treeify","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notatestuser%2Ftreeify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notatestuser%2Ftreeify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notatestuser%2Ftreeify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notatestuser%2Ftreeify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notatestuser","download_url":"https://codeload.github.com/notatestuser/treeify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814880,"owners_count":20352037,"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","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":["console","javascript","pretty-print","terminal","tree","treeify"],"created_at":"2024-07-31T02:01:05.611Z","updated_at":"2025-03-16T12:31:17.645Z","avatar_url":"https://github.com/notatestuser.png","language":"JavaScript","readme":"treeify ![](https://img.shields.io/npm/v/treeify.svg) ![](https://img.shields.io/npm/dt/treeify.svg)\n=======\n\n[![Build Status](https://travis-ci.org/notatestuser/treeify.png?branch=master)](https://travis-ci.org/notatestuser/treeify)\n\n_treeify_ converts a JS object into a nice, visible depth-indented tree for console printing. The structure\ngenerated is similar to what you get by running the ```tree``` command on Unixy platforms.\n\n```\n{\n    oranges: {\n        'mandarin': {                                          ├─ oranges\n            clementine: null,                                  │  └─ mandarin\n            tangerine: 'so cheap and juicy!'        -=\u003e        │     ├─ clementine\n        }                                                      │     └─ tangerine: so cheap and juicy!\n    },                                                         └─ apples\n    apples: {                                                     ├─ gala\n        'gala': null,                                             └─ pink lady\n        'pink lady': null\n    }\n}\n```\n\nIt also works well with larger nested hierarchies such as file system directory trees.\nIn fact, the ```fs_tree``` example does a pretty good job of imitating ```tree```. Try it out!\n\nSee the other included examples or the test suite for usage scenarios.\n\nGetting it\n----------\n\n### For use with node.js\n\nFirst you'll want to run this command in your project's root folder:\n```\n$ npm install treeify\n```\n\nThen proceed to use it in your project:\n```js\nvar treeify = require('treeify');\nconsole.log(\n   treeify.asTree({\n      apples: 'gala',      //  ├─ apples: gala\n      oranges: 'mandarin'  //  └─ oranges: mandarin\n   }, true)\n);\n```\n\n### For use in a browser\n\nTreeify cooperates with Node, AMD or browser globals to create a module. This means it'll work\nin a browser regardless of whether you have an AMD-compliant module loader or not. If such\na loader isn't found when the script is executed, you may access Treeify at ```window.treeify```.\n\nUsage\n-----\n\nThe methods exposed to you are as follows, in a strange kind of signature notation:\n\n### asLines()\n```js\ntreeify.asLines(obj, showValues (boolean), [hideFunctions (boolean),] lineCallback (function))\n// NOTE: hideFunctions is optional and may be safely omitted - this was done to ensure we don't break uses of the previous form\n```\n### asTree()\n```js\ntreeify.asTree(obj, showValues (boolean), [hideFunctions (boolean)]): String\n```\n\nRunning the tests\n-----------------\n\nThere's a pretty extensive suite of Vows tests included.\n```\n$ npm test\n```\n","funding_links":[],"categories":["JavaScript","Repository"],"sub_categories":["Command-line Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotatestuser%2Ftreeify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotatestuser%2Ftreeify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotatestuser%2Ftreeify/lists"}