{"name":"tree-to-string","version":"1.1.0","description":"Convert a tree structure into a human friendly string","main":"index.js","dependencies":{},"devDependencies":{"standard":"^11.0.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/tree-to-string.git"},"scripts":{"test":"standard"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/tree-to-string/issues"},"homepage":"https://github.com/mafintosh/tree-to-string","gitHead":"07ccb2d7f5781d104bcacee87a40a84a0565c987","_id":"tree-to-string@1.1.0","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-zPBaVJlwYGcnVLNFCo5sdPGfojh3NCMZKoBj0XDEqGY+Xlhjr2FVBmrBCYjn7IMKcUCYsfQdA0Nd9iOJAaoVmg==","shasum":"cebdacc10e9b805f24481500bf1e22b619b8b52b","tarball":"http://registry-npm.ywwl.com/tree-to-string/download/tree-to-string-1.1.0.tgz","fileCount":6,"unpackedSize":7297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbK6WTCRA9TVsSAnZWagAAaPEQAIAHyhmIEEtkZCjlPEi8\nXIrxizhjbXxpaq2d2B0tUae2r++/fW8xd5E5rIbLj8gg1HqP8EnhGMJOdsJu\n76+P1NkWIyZqKEgz7ByZaH1/lzbFVAOkJe5PJs/Nf/2zwpCO/tpQGMQQsnhs\n0nDMuNK2j9HA6jNgPayyvdeySVpJTWEd436jhjSVI2Ikr9BJVogJe/yytoJV\nh88iDejTboxfx5GmJ1csV5S5uDJzsgrybj310EeyG7bnXVApya0MAx2CAa+q\nawN3MxmmK5xKZwApojResWj2XqgWjZfEU0XjbzGQN7AWWkbEqXJ0wvWwotol\nR3sI8+mhNyT1yU+e1lOrb1nkZpqpS2zsbm91PTnjIyf0nNsfdBBX8DESZ2TQ\nJ6chTeF7tEScTJ475jytsfUQmMRfLBL0VOXYaorHYr/VRIG+jrz0nqVSETnr\nrHB1VgCKf4rPAZLQXMwA6G511MGz3UCscTkpoGVU2jAi5FhKhP7lvpCcHB+p\nrSoGu15sUadEsWTfYA2RHWeHggwsf12xjwBNXfH4x/jG1lrR2xIkJ9pqUUE/\naJ/BSpcAzUs9EBp/oPcW7wc3D2+HFGYMC1eOoIqvPxZvj1zJVr+121RlNk7x\nDzKwOc2VHGp8zjcuaNkGn8Fdo49GBS6CRC1X6V5D8H6k9JGMrJu1VaB1ombX\nMF3P\r\n=E8Ay\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP48mHXnnTNV0jjy62361gjaygjqlIg1FF2A2n8RUDVwIgMo5IVcPFIbUdROZAcuxBnf+EsbhbTuGR6zUBSubbLt0="}],"size":2893,"noattachment":false,"key":"/tree-to-string/-/tree-to-string-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tree-to-string_1.1.0_1529587091811_0.1655780417493098"},"_hasShrinkwrap":false,"readme":"# tree-to-string\n\n\n```\nnpm install tree-to-string\n```\n\n## Usage\n\n```js\nconst treeToString = require('tree-to-string')\n\nconst tree = {\n  value: [7],\n  children: [{\n    value: [3, 5],\n    children: [{\n      value: [2]\n    }, {\n      value: [4]\n    }, {\n      value: [6]\n    }]\n  }, {\n    value: [8]\n  }]\n}\n\nconsole.log(treeToString(tree))\n```\n\nRunning the above prints something similar to\n\n```\n[ 2 ]─┐\n      │\n[ 4 ]─┼─[ 3, 5 ]─┐\n      │          │\n[ 6 ]─┘          ├─[ 7 ]\n                 │\n           [ 8 ]─┘\n```\n\n## API\n\n#### `const str = treeToString(tree, [format])`\n\nConverts a tree to a human friendly string.\nThe tree should have a layout similar to this\n\n```js\n{\n  value: someJsObject,\n  children: [tree, ...]\n}\n```\n\nFormat defaults to `util.inspect`. Change this to your\nown method that pretty prints your object if your prefer.\n\n## License\n\nMIT\n","publish_time":1529587091868,"_cnpm_publish_time":1529587091868,"dist-tags":{"latest":"1.1.1"}}