{"name":"object-treeify","type":"module","version":"3.1.1","description":"Stringify Object as tree structure","main":"lib/index.js","scripts":{"clean":"rm -rf lib","build":"cp -rf ./src ./lib && ncc build -m -o lib && mv lib/index.js lib/index.min.js && cp src/index.js lib/index.js && rm lib/package.json","build-clean":"yarn run clean && yarn run build","test-simple":"c8 mocha --experimental-loader=./test/hot.js \"./test/**/*.spec.js\"","test":"yarn run clean && yarn run gardener && yarn run test-simple","coveralls":"node ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info","semantic-release":"yarn run build-clean && npx semantic-release","gardener":"node gardener.js","docker":"docker run --net host -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash","t":"yarn test","ts":"yarn run test-simple","tsv":"yarn run test-simple --verbose","u":"yarn upgrade --latest --force","i":"yarn install --frozen-lockfile","it":"yarn run i && yarn run t","ncc-analyze":"yarn clean && cp -rf ./src ./lib && ncc build -m -s -o lib && npx source-map-explorer lib/index.js --only-mapped --html source.html && yarn clean"},"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/core":"7.18.6","@babel/eslint-parser":"7.18.2","@babel/register":"7.18.6","@blackflux/eslint-plugin-rules":"2.1.0","@blackflux/robo-config-plugin":"7.9.4","@vercel/ncc":"0.34.0","c8":"7.11.3","chai":"4.3.6","coveralls":"3.1.1","eslint":"8.19.0","eslint-config-airbnb-base":"15.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-json":"3.1.0","eslint-plugin-markdown":"2.2.1","eslint-plugin-mocha":"10.0.5","js-gardener":"3.0.5","smart-fs":"3.0.1","treeify":"1.1.0"},"licenses":[{"type":"MIT","url":"https://github.com/blackflux/object-treeify/blob/master/LICENSE"}],"engines":{"node":">= 12"},"dependencies":{},"gitHead":"c1bd7d0d2c8e29ef581117c157bf29583b97869e","_id":"object-treeify@3.1.1","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-8yqYVZVAiGW3w4dFLxDBoMosId2JI4qVubiX/z9JDbe/1QOzS2cdm3F0ZGL8hk4i/8+gaMK1UKSR35V946d2RQ==","shasum":"a457eabbc7dbf386f72b63b1ba505ee449cc59fe","tarball":"http://registry-npm.ywwl.com/object-treeify/download/object-treeify-3.1.1.tgz","fileCount":6,"unpackedSize":12112,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEgiyWpfWPwETQuqND/z/7uzfZ3ivyIoQavd5IbwQZqQIgYorzyDhS//TKTCWN1PeFV3nAXLv+H/qcsSLJnmFqgrM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0K8aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBxQ/9FhlPbOnekXphBywLpbOb1ep514r/IEfjjTt0b63/4Hqt+8t1\r\nIHZUSJecec8kLKtmdP3HrASZm56tBsYWerxgPf+eeh6u6xaNsUlYrsRqDlzc\r\nkRMnwngcPpqpe/hf2HOwf6gNeTHjvi2xm5fVnUOwlVuC97AbJjCtMCl4SUM8\r\np/OQz7TxfJCuQZiV+EOkpGyRM6WprhRah+mrRg8TWPXdjVYnvxp1Lh9P6PoV\r\nnOlr6JkRLf0xjr+PgoMx0z1mD11cL7MdZm0PqtCvHzjiM66mV95uV68CdsiR\r\nnCGSDSWkh0f8D2mWu8RCTNvgbn4jNjGN3P/Kr7e0TWiRTwSC8DBoDHhQi01p\r\n5byhTqiSdgVW5NJeIzkcbPmjCeEy+J801SImV7B7AwI4t1FYEwmjmoJ3NWzO\r\n9xJoZVCHwSwoikRmiHNlb4jeok6Evy3Dr/PkA4gAQL3DkH95XDqZwuPY901G\r\nF1lNgPv9lPdEPLqm14r/uSgZlZrP16ypI6wV0XCYHbYKi59Ptjh4G16wvMXp\r\ns8ihPGsvT71qq4g72oJYhBb5AY7TVEGKIkl2TrL4O8wHgYgDSJsjSNXVRaYk\r\nxZyY+En5ylS7PepsRb0z0sCr60yeWMDOo1+BH7o6noW15khsmlX3jLeQ/oh5\r\nT2fKDzSM0PrXSHXOopRxyakiaHmDjfCBl4s=\r\n=zxS6\r\n-----END PGP SIGNATURE-----\r\n","size":4643,"noattachment":false,"key":"/object-treeify/-/object-treeify-3.1.1.tgz"},"_npmUser":{"name":"simlu","email":"npm@blackflux.com"},"directories":{},"maintainers":[{"name":"simlu","email":"npm@blackflux.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/object-treeify_3.1.1_1657843481969_0.28543572314310506"},"_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":1657843482131,"_cnpm_publish_time":1657843482131,"dist-tags":{"latest":"5.0.1"}}