{"name":"object-treeify","version":"1.1.31","description":"Stringify Object as tree structure","main":"lib/index.js","scripts":{"clean":"rm -rf lib","build":"npx babel src --out-dir lib --copy-files --include-dotfiles --config-file ./.babelrc","build-clean":"yarn run clean && yarn run build","test-simple":"nyc mocha \"./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","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"},"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.12.10","@babel/core":"7.12.10","@babel/register":"7.12.10","@blackflux/eslint-plugin-rules":"1.3.42","@blackflux/robo-config-plugin":"3.10.15","babel-eslint":"10.1.0","chai":"4.2.0","coveralls":"3.1.0","eslint":"7.15.0","eslint-config-airbnb-base":"14.2.1","eslint-plugin-import":"2.22.1","eslint-plugin-json":"2.1.2","eslint-plugin-markdown":"1.0.2","eslint-plugin-mocha":"8.0.0","js-gardener":"2.0.181","nyc":"15.1.0","semantic-release":"17.3.0","babel-preset-latest-node":"5.2.0"},"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/*","lib/*"]},"licenses":[{"type":"MIT","url":"https://github.com/blackflux/object-treeify/blob/master/LICENSE"}],"engines":{"node":">= 10"},"dependencies":{},"gitHead":"2a1bda4261fbe0de9eda9df6bd64ffc961bdeb11","_id":"object-treeify@1.1.31","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-kt2UuyHDTH+J6w0pv2c+3uuEApGuwgfjWogbqPWAvk4nOM/T3No0SzDtp6CuJ/XBUy//nFNuerb8ms7CqjD9Tw==","shasum":"eb083c8eb25b512c9feea088e72b03aa13032d5e","tarball":"http://registry-npm.ywwl.com/object-treeify/download/object-treeify-1.1.31.tgz","fileCount":4,"unpackedSize":9674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1BVMCRA9TVsSAnZWagAACjwP/1/dbeHWS1hHCvVzn1aD\n7dotM4wSEJPkCJWRHolJQ97Fc8Pv/BOvy6EG/XmHM9kbS5oNz6eOdJXJipTR\ntAJ9mYyEPcz1qaFbYPDa45w6/cV+Ce0g1M3DYDYIdYHyPhymRTfuotFsUVjT\nSJQ1j3fJeMk1cUq2NR0DA28DvXtT2IOI+3mucEIieHglIfZeD1TTjNXFFf0b\nEJxoVCKJHw08DEj/ye20PjG7KEuz/huRqdalflXGhRl+GTTOdjmhWQpUhNWU\nBoUiWAphBlS4imz8sPAFQV+5sfVZ+sKcvn5sNgwBnryIbkIQJdYDqxXLDpgw\n52mrfOKXO+F6oc+jdDSWVPYGTt8lbsLzXC8ukS8IKu//ju4QOE7/iuANDC2z\ndiaHeQUa5BFRImOrm9oB8ukMx5GXTgFQpESMc4KwrrR3g/UQPKYYdWYfo/Oi\nD6Lm9pJWXCXiaeNqbs/4DCYjRqFj4135v49FfqPRc5OUPPIyTYVCjB+hakXh\nEEZvoQzdyqSm0kJveYeNY0a3bXVWa/65EpVXKujAumu54fB84BJYU3aGnBR8\nsQgkWUHfDkMPWbt6gIbwgER+Kq/nHe4WYRCmuNg2ABq99QaV1uqut99bVK+d\neEwT6u0wufNUpEsV7OhydhUEqctxRdckuvWQ1e+3xkvoY6h3JBNhiRAfY9Mf\nQ6MX\r\n=nzSf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEiE4IN8v8evWjvyP86drg0LzevFbRQHQtBt/5bNYb84AiEA25aqMqjFkjnWniJVowf5RyGo5wOAlhrehajIBy3D9Xk="}],"size":3781,"noattachment":false,"key":"/object-treeify/-/object-treeify-1.1.31.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_1.1.31_1607734603753_0.3804154240705615"},"_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":1607734603917,"_cnpm_publish_time":1607734603917,"dist-tags":{"latest":"5.0.1"}}