{"name":"treeify","version":"1.1.0","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":"3855e5d6e3f6b7236b1b41d78ecde4a9cb6bb1c7","bugs":{"url":"https://github.com/notatestuser/treeify/issues"},"homepage":"https://github.com/notatestuser/treeify#readme","_id":"treeify@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"notatestuser","email":"me@lukep.org"},"maintainers":[{"name":"notatestuser","email":"notatestuser@gmail.com"}],"dist":{"integrity":"sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==","shasum":"4e31c6a463accd0943879f30667c4fdaff411bb8","tarball":"http://registry-npm.ywwl.com/treeify/download/treeify-1.1.0.tgz","fileCount":9,"unpackedSize":22209,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+cxUrY9Hz+BxKK8LEP1vWphX5s5ZjWeqLBMeA1PPsTAiEA1UG994ixzDrI1zrhLb3AnoFmRiWbqJyXdXJyBqvqcAM="}],"size":6895,"noattachment":false,"key":"/treeify/-/treeify-1.1.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/treeify_1.1.0_1518789059981_0.8757387170182052"},"_hasShrinkwrap":false,"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","publish_time":1518789060030,"_cnpm_publish_time":1518789060030,"dist-tags":{"latest":"1.1.0"}}