{"name":"unist-util-inspect","version":"4.1.3","description":"Unist node inspector","license":"MIT","keywords":["retext","remark","unist","inspect"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-inspect.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-inspect/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{"is-empty":"^1.0.0"},"devDependencies":{"browserify":"^16.0.0","chalk":"^2.3.0","esmangle":"^1.0.1","nyc":"^11.0.0","prettier":"^1.12.1","remark-cli":"^5.0.0","remark-preset-wooorm":"^4.0.0","retext":"^5.0.0","strip-ansi":"^4.0.0","tape":"^4.4.0","xo":"^0.20.0"},"scripts":{"format":"remark . -qfo && prettier --write '**/*.js' && xo --fix","build-bundle":"browserify index.js --bare -s unistUtilInspect > unist-util-inspect.js","build-mangle":"esmangle unist-util-inspect.js > unist-util-inspect.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"guard-for-in":"off","no-var":"off","prefer-arrow-callback":"off"},"ignore":["unist-util-inspect.js"]},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"a4603ece756e751e56117879f1db7b6a901192dc","homepage":"https://github.com/syntax-tree/unist-util-inspect#readme","_id":"unist-util-inspect@4.1.3","_npmVersion":"6.0.0","_nodeVersion":"9.5.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"integrity":"sha512-Fv9R88ZBbDp7mHN+wsbxS1r8VW3unyhZh/F18dcJRQsg0+g3DxNQnMS+AEG/uotB8Md+HMK/TfzSU5lUDWxkZg==","shasum":"39470e6d77485db285966df78431219aa1287822","tarball":"http://registry-npm.ywwl.com/unist-util-inspect/download/unist-util-inspect-4.1.3.tgz","fileCount":4,"unpackedSize":9175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa51cPCRA9TVsSAnZWagAAzEQP/jJ4gZ/I7OfmU5NUYaMZ\nxiFfvFNpGuVR+NW8YLBQoa3i392k7yQr+pyidRYpiqiKMPazvQ8uLQg2ffyd\nrc/l6J4Jk5oNcbm/8E9Hmf4f5HClhafpfZyPosDjookueamEE/f1pgdKTONF\nBKz9hAWSzsM6jkd8UT4/gTprLtqhVahekS+tAgrn0Ei48ebDCK0issD7lbEX\nf5GdXvfDNlmMqh419hZOaK4BmHcQpBVUeTtxYiBBre9rJWXu4J7bT/v8CqRL\nrW8c9/hBcQJLEEum+29KBxaI27zIIDsDzf8qvUHw4klxNhIlc63ylhNQd63T\nJUbJdEuD7RCMeISjfLtOz3B+cBGS/GJI0VjDXXYwvxeZdQ2vzVpOBqixqkuX\nrCRt/irBEW+avmSDkjyqmuprsGDtwhrWNXRrsYQSMkpWHZpNilenj41GLw1L\n+nxGypTvSNC3045mmrM/whrrISLi07elx0DoSaEh0+ABUZ4RsrPo23sP/eVM\nmCL62oUp/GiTF8xr7gwzqIHk4n1udaSXFyfZ8rYLQujty77uS7FWGBihaDDs\nPKsr64pcAoKzzL05OrGeswLO0wdgFWLKEsndwTYjBfLJAzY1jFjDNA2hgORy\nyHTUE+T/H7ro8A+1ZWQwDWedsvrBgYx13zApcgop+2EJd1XfwD/+Lj9d6Qoe\nXn/X\r\n=VXue\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVqIPv1VLoBype+PtzSGAsRYe/V/iDProF5NW6HEtbuAIgXVy2nViMWhvsJFnStEuQFHtCFWeBSJTna0DFkGezpQU="}],"size":3881,"noattachment":false,"key":"/unist-util-inspect/-/unist-util-inspect-4.1.3.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unist-util-inspect_4.1.3_1525110543081_0.7238102085717704"},"_hasShrinkwrap":false,"readme":"# unist-util-inspect\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[unist][] utility to inspect trees.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`inspect(tree[, options])`](#inspecttree-options)\n    *   [`inspectColor(tree[, options])`](#inspectcolortree-options)\n    *   [`inspectNoColor(tree[, options])`](#inspectnocolortree-options)\n    *   [`Options`](#options)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis is a utility pretty prints the tree.\n\n## When should I use this?\n\nThis utility pretty prints the tree in a format that is made custom for unist\ntrees, which is terser than the often verbose and repetitive JSON,\nto more easily spot bugs and see what’s going on in the tree.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install unist-util-inspect\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {inspect} from 'https://esm.sh/unist-util-inspect@8'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {inspect} from 'https://esm.sh/unist-util-inspect@8?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {u} from 'unist-builder'\nimport {inspect} from 'unist-util-inspect'\n\nconst tree = u('root', [\n  u('literal', '1'),\n  u('parent', [\n    u('void', {id: 'a'}),\n    u('literal', '2'),\n    u('node', {id: 'b'}, [])\n  ])\n])\n\nconsole.log(inspect(tree))\n```\n\nYields:\n\n```text\nroot[2]\n├─0 literal \"1\"\n└─1 parent[3]\n    ├─0 void\n    │     id: \"a\"\n    ├─1 literal \"2\"\n    └─2 node[0]\n          id: \"b\"\n```\n\n## API\n\nThis package exports the identifiers [`inspect`][api-inspect],\n[`inspectColor`][api-inspectcolor], and [`inspectNoColor`][api-inspectnocolor].\nThere is no default export.\n\n### `inspect(tree[, options])`\n\nInspect a tree, with color in Node, without color in browsers.\n\n###### Parameters\n\n*   `tree` ([`Node`][node])\n    — tree to inspect\n*   `options` ([`Options`][api-options], optional)\n    — configuration\n\n###### Returns\n\nPretty printed `tree` (`string`).\n\n### `inspectColor(tree[, options])`\n\nInspect a tree, with color.\nOtherwise same as [`inspect`][api-inspect].\n\n### `inspectNoColor(tree[, options])`\n\nInspect a tree, without color.\nOtherwise same as [`inspect`][api-inspect].\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `showPositions` (`boolean`, default: `true`)\n    — whether to include positional information\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `unist-util-inspect@^8`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for\nways to get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definition -->\n\n[build-badge]: https://github.com/syntax-tree/unist-util-inspect/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/unist-util-inspect/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-inspect.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/unist-util-inspect\n\n[downloads-badge]: https://img.shields.io/npm/dm/unist-util-inspect.svg\n\n[downloads]: https://www.npmjs.com/package/unist-util-inspect\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=unist-util-inspect\n\n[size]: https://bundlejs.com/?q=unist-util-inspect\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/syntax-tree/unist/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[health]: https://github.com/syntax-tree/.github\n\n[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md\n\n[support]: https://github.com/syntax-tree/.github/blob/main/support.md\n\n[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md\n\n[unist]: https://github.com/syntax-tree/unist\n\n[node]: https://github.com/syntax-tree/unist#node\n\n[api-inspect]: #inspecttree-options\n\n[api-inspectcolor]: #inspectcolortree-options\n\n[api-inspectnocolor]: #inspectnocolortree-options\n\n[api-options]: #options\n","publish_time":1525110543138,"_cnpm_publish_time":1525110543138,"dist-tags":{"latest":"8.1.0"}}