{"name":"unist-util-inspect","version":"7.0.2","description":"unist utility to inspect nodes","license":"MIT","keywords":["unist","unist-util","util","utility","inspect","debug","log","console"],"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"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","browser":{"./lib/color.js":"./lib/color-browser.js"},"react-native":{"./lib/color.js":"./lib/color-browser.js"},"types":"index.d.ts","dependencies":{"@types/unist":"^2.0.0"},"devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","chalk":"^5.0.0","hastscript":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","retext":"^8.0.0","strip-ansi":"^7.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-builder":"^3.0.0","xast-util-from-xml":"^2.0.0","xastscript":"^3.0.0","xo":"^0.53.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"04775f5f5af91c1ba3dc81cadf957b4abd49642e","homepage":"https://github.com/syntax-tree/unist-util-inspect#readme","_id":"unist-util-inspect@7.0.2","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-Op0XnmHUl6C2zo/yJCwhXQSm/SmW22eDZdWP2qdf4WpGrgO1ZxFodq+5zFyeRGasFjJotAnLgfuD1jkcKqiH1Q==","shasum":"858e4f02ee4053f7c6ada8bc81662901a0ee1893","tarball":"http://registry-npm.ywwl.com/unist-util-inspect/download/unist-util-inspect-7.0.2.tgz","fileCount":11,"unpackedSize":19199,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCisRW+CgVONSdjvsbPvlaAfNP3n0zaPaOkoDIItn4KhgIgC3Us5M3zmiSEw2ggnCAQ5rH+JrhKEdj5L0i1p5Ybvn4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0AHsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3TQ//cEfsaxJBcR9Wv48daHFCDT468xXGIjRW/9Ex9/pFfYTtSjrQ\r\ncZ9tZVvp9Xj7JqJQpy6Vid5+ldB147xbONDe+bxE9Oi4DRNW+XaZ14weQmM1\r\n9WmqfWMUKO0cccr4ilMdXFKnruOBGFuR11v908Q28s4PBjPnEtKpbE5lLyqu\r\nWMurAKKYVuK9hZWLdRl+qkBx9LG6K2lSwJvqyeKWgCpBQlQ+SgIwKWVa7gr2\r\nL69jenneomTdbabwseEBBc+3ek4rrvabL1UDZByOeEbQYd8Y7h8bfz0Qm00p\r\nIiLi4XCrbPOBsiksAX2ZPffHMftJ+a3MDe2pZCbDZyXT/UhZfe+Z3h0hyOBf\r\n1zkJT04ehyVmeyPISuU56jYQAzc1GfAT8EOMAforRde/CwIwwssizjFSZ6a6\r\nafub5tqyW/DR5kToEwfCAi4QjG+N9R/yRU5NDrUnC4sAUbON9heRzYlfr+fu\r\n1P1LK84lPUp12wUZ4z7Cq52Cjwyr4BEq1RDEvGeuBrlXzIezHewCzH+m5lBt\r\nVio+MWNoCqGQ/qFKWRJ1ncP8mR2JJuhqD7zeZiVSCGaG1ZxwIw6KxqJXSvqm\r\nfmbM42Hf9j+SJeEXXHji14dV0b8uThvAsV4ww1f0ACvAZ5rpnx5MfO+BVb5g\r\n2v2I7StjQ7B9xjemsbBqd/PB2X13AzSurEU=\r\n=FrQ7\r\n-----END PGP SIGNATURE-----\r\n","size":6227,"noattachment":false,"key":"/unist-util-inspect/-/unist-util-inspect-7.0.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"kmck","email":"keith@mcknig.ht"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unist-util-inspect_7.0.2_1674576363907_0.4556790383307361"},"_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":1674576364143,"_cnpm_publish_time":1674576364143,"dist-tags":{"latest":"8.1.0"}}