{"name":"object-treeify","version":"1.1.2","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":"33a576cb2bda49d9b1f33e2e74019be9e957e1f2","_id":"object-treeify@1.1.2","_npmVersion":"6.5.0","_nodeVersion":"10.15.3","_npmUser":{"name":"simlu","email":"npm@blackflux.com"},"dist":{"integrity":"sha512-Z7kf0fQ9rFQR9LTRXBryGVy7uuRj8ohnL6HRuRXJ6Ybi9K8lkGUVMxh7/7UHNPCZ4UhyEXpdv9RA+cHCFK/USw==","shasum":"18432542e5f2181ed732b5f49e195987cc584991","tarball":"http://registry-npm.ywwl.com/object-treeify/download/object-treeify-1.1.2.tgz","fileCount":4,"unpackedSize":15031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckvD+CRA9TVsSAnZWagAAyMAP/2fWUfa2cJ6wVdCXXmSW\nEhbz9w8yKvDeyFBGompUljaij+Gp63IvGAY2BDxlw+SfOy3ikm1oBmADrDnp\ni3QR/pTJjgmpfFe3t8h4BtxlXvn36ulGdTPQxpQPGLlqgfl0gbleo151L0H7\njXYm+kdyBbAbo7xYDpfPj6AndqS/2Tz0KmEkA0YuIV4DKxpbt0a4DrLLDx7M\nVgqUqqknGHq+j1wPmEFKNri0gxW+2KNRWy8eZgffo7LD/7gxkPMFQi+Z2qfZ\nkvABIt3JSR/4wE8RcAsIWEob2CLZcH9BAh6KpJlPVjLmmJtqtV5eY8RW038E\n1EsQd16SFoKXoi11qeCLGw8xvPOFF3IDK1DNhptxejMS4Y9K0r57BvI5R7Yc\nmRs3NsXHQq9ALbztKrO7z06vjl4gQHcCLKKtSJmzRf11pVtNypG36bqcY5kJ\nQBuHtDVs2Nm8wpSTZRUsUxRptKq9ZOSHvMXUrHFfFubTxiDoIaKSSwo9AB6H\n4aAs3dc2MnXiKdvtbAfyIsgHU9lv7ZfYmj6w2lGNvixq2oppuuVNLzgwg9P5\nzq9Nrxbwu1qyI4A6kHYPwcla1f7TocDCx7z9REbJK2tZ1ZOReHXzu+BVzi/S\nnsPyMwv4y2uqTz71hZ/PX/mfXjH6l/p1jIi7bh/4ZrMmN6GrNycZdXoZ1TZZ\nKjAu\r\n=rV/N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEmWy9feDo0846mISng3lBWty0rgkB7EINiEF9tFAXXBAiEAuQmH2ti0TbOUWPfJzzZ9XLfQhlFzpZyUGnUxbjIevR8="}],"size":6155,"noattachment":false,"key":"/object-treeify/-/object-treeify-1.1.2.tgz"},"maintainers":[{"name":"simlu","email":"npm@blackflux.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/object-treeify_1.1.2_1553133821337_0.05274162886677436"},"_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":1553133821518,"_cnpm_publish_time":1553133821518,"dist-tags":{"latest":"5.0.1"}}