{"_id":"@osmura/treeify","_rev":"3-bcd1b6da35ed3907b1ac250fbb9948e6","name":"@osmura/treeify","dist-tags":{"latest":"1.1.3"},"versions":{"1.1.0":{"name":"@osmura/treeify","version":"1.1.0","keywords":["object","tree","print","console","pretty"],"author":{"name":"Luke Plaster","email":"notatestuser@gmail.com"},"license":"MIT","_id":"@osmura/treeify@1.1.0","maintainers":[{"name":"osmura","email":"osmura-rsesmt@web-library.net"}],"homepage":"https://github.com/notatestuser/treeify#readme","bugs":{"url":"https://github.com/notatestuser/treeify/issues"},"dist":{"shasum":"ac768093b8edb71e6a5b3fafd2a46dc6163ef3f8","tarball":"https://registry.npmjs.org/@osmura/treeify/-/treeify-1.1.0.tgz","fileCount":9,"integrity":"sha512-2PLBHtfAWyrChn4Lk71+pUObkQg//RYq+WvTNPq9WWaKqStMmc5uedcv/+H4iRjCbGgvLpKKm/o1ZvTFkEqOyw==","signatures":[{"sig":"MEYCIQC5bUVuaYmGn53NDg+cPwwuKFD2MfmKU4gC4f2qz36AQgIhANybm5l9BVg/G+Wu6kYV72wz/nFKnHkdA7o8lHwflGW7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22438},"main":"./treeify","engines":{"node":">=0.6"},"gitHead":"25241c0e5a0546b26bb7fc9d5a2bd72adf7505fe","scripts":{"test":"./node_modules/vows/bin/vows --spec"},"_npmUser":{"name":"osmura","email":"osmura-rsesmt@web-library.net"},"licenses":[{"url":"http://lp.mit-license.org/","type":"MIT"}],"repository":{"url":"git+https://github.com/notatestuser/treeify.git","type":"git"},"_npmVersion":"11.11.0","description":"converts a JS object into a nice and readable tree structure for the console","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vows":"git://github.com/Filirom1/vows.git#expect"},"_npmOperationalInternal":{"tmp":"tmp/treeify_1.1.0_1782008429301_0.5365668482849186","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@osmura/treeify","version":"1.1.2","keywords":["object","tree","print","console","pretty"],"author":{"name":"Luke Plaster","email":"notatestuser@gmail.com"},"license":"MIT","_id":"@osmura/treeify@1.1.2","maintainers":[{"name":"osmura","email":"osmura-rsesmt@web-library.net"}],"homepage":"https://github.com/notatestuser/treeify#readme","bugs":{"url":"https://github.com/notatestuser/treeify/issues"},"dist":{"shasum":"3714725cbf68087940ee1830ddddf4d087795f8d","tarball":"https://registry.npmjs.org/@osmura/treeify/-/treeify-1.1.2.tgz","fileCount":9,"integrity":"sha512-ljXKb95iSbTufE2YFpI4tPWpXg18K1s08/P0fY2OdKa/23pnXxgCy/ZCc6EHJSAdEYwCYDXhdZ3pY4Prk6+i5w==","signatures":[{"sig":"MEUCIQDTqe/OriXhYy9gzyd1LI8bc/Bsn0esWZah9xzSI2XEVgIgJjmuywh9yDyUycT7FlccCuZ5dND/VT4Xhh9u1bJYz18=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115632},"main":"./treeify","engines":{"node":">=0.6"},"gitHead":"9c5b6732196f1e76f350995deb9c568793aa4c9c","scripts":{"test":"./node_modules/vows/bin/vows --spec"},"_npmUser":{"name":"osmura","email":"osmura-rsesmt@web-library.net"},"licenses":[{"url":"http://lp.mit-license.org/","type":"MIT"}],"repository":{"url":"git+https://github.com/notatestuser/treeify.git","type":"git"},"_npmVersion":"11.11.0","description":"converts a JS object into a nice and readable tree structure for the console","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vows":"git://github.com/Filirom1/vows.git#expect"},"_npmOperationalInternal":{"tmp":"tmp/treeify_1.1.2_1782120293632_0.40214196788984413","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@osmura/treeify","version":"1.1.3","author":{"name":"Luke Plaster","email":"notatestuser@gmail.com"},"description":"converts a JS object into a nice and readable tree structure for the console","license":"MIT","scripts":{"test":"./node_modules/vows/bin/vows --spec"},"main":"./treeify","repository":{"type":"git","url":"git+https://github.com/notatestuser/treeify.git"},"keywords":["object","tree","print","console","pretty"],"devDependencies":{"vows":"git://github.com/Filirom1/vows.git#expect"},"licenses":[{"type":"MIT","url":"http://lp.mit-license.org/"}],"engines":{"node":">=0.6"},"gitHead":"9c5b6732196f1e76f350995deb9c568793aa4c9c","_id":"@osmura/treeify@1.1.3","bugs":{"url":"https://github.com/notatestuser/treeify/issues"},"homepage":"https://github.com/notatestuser/treeify#readme","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-M8ahWIJgYF+6szsNWwkeanSK8mmbF3daKtOWGTU8lhTr4xTH6oe7g44TV8rxV0YzOHZnfNoiD9aUNDSjpFUunA==","shasum":"de2a520d3af5608a8048d9e940028782245b289f","tarball":"https://registry.npmjs.org/@osmura/treeify/-/treeify-1.1.3.tgz","fileCount":9,"unpackedSize":115632,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIQDuq4fW/R70sAH+9OeWDZSkUTyTCjRboP0xginkJYfYywIfLCM/pnh3HNCgzIYb6SSh9vpvSGKO776c0FLrXLIiKA=="}]},"_npmUser":{"name":"osmura","email":"osmura-rsesmt@web-library.net"},"directories":{},"maintainers":[{"name":"osmura","email":"osmura-rsesmt@web-library.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/treeify_1.1.3_1782121078174_0.20829112446815268"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T02:20:29.177Z","modified":"2026-06-22T09:37:58.405Z","1.1.0":"2026-06-21T02:20:29.423Z","1.1.2":"2026-06-22T09:24:53.875Z","1.1.3":"2026-06-22T09:37:58.314Z"},"bugs":{"url":"https://github.com/notatestuser/treeify/issues"},"author":{"name":"Luke Plaster","email":"notatestuser@gmail.com"},"license":"MIT","homepage":"https://github.com/notatestuser/treeify#readme","keywords":["object","tree","print","console","pretty"],"repository":{"type":"git","url":"git+https://github.com/notatestuser/treeify.git"},"description":"converts a JS object into a nice and readable tree structure for the console","maintainers":[{"name":"osmura","email":"osmura-rsesmt@web-library.net"}],"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!'        -=>        │     ├─ 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","readmeFilename":"README.md"}