{"name":"object-treeify","version":"1.1.4","description":"Stringify Object as tree structure","main":"lib/index.js","scripts":{"test":"npm run clean && npm run gardener && npm run test-simple","clean":"rm -rf lib","build":"npx babel src --out-dir lib --source-maps inline --copy-files --include-dotfiles","clean-build":"npm run clean && npm run build","build-artifact":"npm run clean-build && tar -zxvf $(npm pack) && rm *-0.0.0-development.tgz && cd package && tar -zcvf ../release.tar.gz . && cd .. && rm -rf package","test-simple":"nyc mocha \"./test/**/*.spec.js\"","coveralls":"node ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info","semantic-release":"npm run build-artifact && npm run clean-build && npx semantic-release","gardener":"node gardener"},"repository":{"type":"git","url":"git+https://github.com/blackflux/object-treeify.git"},"keywords":["object","tree","print","console","pretty","treeify","stringify","visualize","convert","string","debug"],"author":{"name":"Lukas Siemon"},"license":"MIT","bugs":{"url":"https://github.com/blackflux/object-treeify/issues"},"homepage":"https://github.com/blackflux/object-treeify#readme","devDependencies":{"@babel/cli":"7.2.3","@babel/core":"7.4.0","@babel/plugin-proposal-object-rest-spread":"7.4.0","@babel/plugin-transform-flow-comments":"7.4.0","@babel/preset-flow":"7.0.0","@babel/register":"7.4.0","babel-eslint":"10.0.1","chai":"4.2.0","coveralls":"3.0.3","eslint":"5.15.3","js-gardener":"1.38.6","nyc":"13.3.0","semantic-release":"15.13.3"},"nyc":{"tempDir":"./coverage/.nyc_output","report-dir":"./coverage","check-coverage":true,"per-file":false,"lines":100,"statements":100,"functions":100,"branches":100,"include":["**/*.js"],"reporter":["lcov","text-summary"],"require":["@babel/register"],"extension":[],"cache":true,"all":true,"babel":true,"exclude":["gardener.js","node_modules/*","coverage/*","flow-typed/*","lib/*"]},"licenses":[{"type":"MIT","url":"https://github.com/blackflux/object-treeify/blob/master/LICENSE"}],"engines":{"node":">= 8.10"},"dependencies":{},"gitHead":"910f2cb3fed633a0d6b33f9e9198b9840ea9581f","_id":"object-treeify@1.1.4","_npmVersion":"6.5.0","_nodeVersion":"10.15.3","_npmUser":{"name":"simlu","email":"npm@blackflux.com"},"dist":{"integrity":"sha512-ouE/RlDNGTSERblQU7vx5RJk6L9+XW8vpA8Y5w4GJZWJ9bh0Nk32/GQ/vXZCXZYPPWAznfa9dGvMWTasIjC9RQ==","shasum":"a225e3620188f88a4c709793aacc42d2c4fad6d2","tarball":"http://registry-npm.ywwl.com/object-treeify/download/object-treeify-1.1.4.tgz","fileCount":4,"unpackedSize":15267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmFvKCRA9TVsSAnZWagAAoAkP/A9C0BAYrtKif+PGXrcA\n4eSZZUFgAKe5shp/dtngry1sCII9155jbI2uQ0pK7Q/G1hMthsgwIDDswKw2\nKxRu0MIajvlpKx2+j1ndymKSVerFu7iboQddZMpLPhP7QrfCaTczbtCISyH1\nLpFYt1itS/nf71w1rvvBekJDIUMMrOWT94vzzPNlGTkn/ekj6lm9Phj9o9p1\nl+D9EEkKFlmwhKpjrp/47STHYCEMqbGzt0XyIkhzGNFy6a3o3vP5cXrqLCrs\nesRMmFGRvrz1JatLt1VYzG/HqFYpP0Rn5+MeoPYKcHmIoMLR5cnqITo7jCS1\nLEbAFZP+xECQWghHeor432wHUF60mV+aJyYhohx/Ix862/D0vkvWnX0KCPlx\nMhQy4KQr1iKRGsDANjWIu8xQ5u7Fy3Qker8h9IHFBSSZy0q7NGqKCR70WKSM\nOao47ootAVjMGLBrV0jGbbrQeELZFlar6XI+obSQV6xhV66VoMyEk5Rh95tv\nnPHjqd3E6RQLTJfV5oiMphGRz6OUShMNAVYNcDlH0VBh07vOhBhY+FLBl1l6\nHPjiYsJn56jfxdZ0/HyVJQ5XFxngKDtL5vfnkwT3EO0fTnY/DS+Kxt8xL6Os\nglmyFWxhshFiW4Z29DY+Dc/Nja2LeLmoNhLCOwb2Sz948o4w0cNK9hMLLukz\nopzG\r\n=t2nb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQTEyDCHDDQ0gyZifpaSo2HsxP+RrkoXdcKfrhapmxRAiAps2IiJOrKiohCne4VseyaT5V15Hr364e3ouIWopLDcw=="}],"size":6331,"noattachment":false,"key":"/object-treeify/-/object-treeify-1.1.4.tgz"},"maintainers":[{"name":"simlu","email":"npm@blackflux.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/object-treeify_1.1.4_1553488841473_0.3094053965989454"},"_hasShrinkwrap":false,"readme":"# object-treeify\n\n[![Build Status](https://circleci.com/gh/blackflux/object-treeify.png?style=shield)](https://circleci.com/gh/blackflux/object-treeify)\n[![NPM](https://img.shields.io/npm/v/object-treeify.svg)](https://www.npmjs.com/package/object-treeify)\n[![Downloads](https://img.shields.io/npm/dt/object-treeify.svg)](https://www.npmjs.com/package/object-treeify)\n\nStringify Object as tree structure\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\nProject was inspired by [treeify](https://github.com/notatestuser/treeify) and works almost identical. However\nthe algorithm is much shorter and faster, works without recursion and is very memory efficient. Furthermore\nthe output can be sorted using a custom comparator function.\n\n## Install\n\n    $ npm install --save object-treeify\n\n## Usage\n\n<!-- eslint-disable import/no-unresolved,import/no-extraneous-dependencies -->\n```js\nconst treeify = require('object-treeify');\n\ntreeify({\n  oranges: {\n    mandarin: {\n      clementine: null,\n      tangerine: 'so cheap and juicy!'\n    }\n  },\n  apples: {\n    gala: null,\n    'pink lady': null\n  }\n}, {/* options */});\n\n// =>\n// ├─ oranges\n// │  └─ mandarin\n// │     ├─ clementine\n// │     └─ tangerine: so cheap and juicy!\n// └─ apples\n//    ├─ gala\n//    └─ pink lady\n```\n\n### Features\n\n- Allows for custom sorting\n- Very fast and memory efficient implementation\n- Input traversed exactly once\n- Dependency free and small in size\n- Tests to verify correctness\n- Handles circular references\n\n## Options\n\n### joined\n\nType: `boolean`<br>\nDefault: `true`\n\nBy default a single string is returned. Can be set to `false` to instead return an array containing lines.\n\n#### spacerNoNeighbour\n\nType: `string`<br>\nDefault: `   `\n\nPrefix for depth level when no further neighbour is present.\n\n#### spacerNeighbour\n\nType: `string`<br>\nDefault: `│  `\n\nPrefix for depth level when a further neighbour is present.\n\n#### keyNoNeighbour\n\nType: `string`<br>\nDefault: `└─ `\n\nPrefix for key when no further neighbour is present.\n\n#### keyNeighbour\n\nType: `string`<br>\nDefault: `├─ `\n\nPrefix for key when a further neighbour is present.\n\n#### separator\n\nType: `string`<br>\nDefault: `: `\n\nUsed to separate node key from node value.\n\n#### renderFn\n\nType: `function`<br>\nDefault: `(node) => (['boolean', 'string', 'number'].includes(typeof node) ? node : undefined)`\n\nCan be used to overwrite the node rendering logic. Node is rendered if result is not equal `undefined`.\n\n#### sortFn\n\nType: `function`<br>\nDefault: `null`\n\nFunction that defines the key sort order. Defaults to ordering of `Object.keys(...)`, which is typically insertion order.\n\n#### breakCircularWith\n\nType: `string` or `null`<br>\nDefault: ` (circular ref.)`\n\nWhen `string`, circular references are broken with that string, at a minor performance cost.\n\n## Examples\n\nMore examples can be found in the tests.\n","publish_time":1553488841634,"_cnpm_publish_time":1553488841634,"dist-tags":{"latest":"5.0.1"}}