{"name":"unist-util-generated","version":"2.0.1","description":"unist utility to check if a node is generated","license":"MIT","keywords":["unist","unist-util","util","utility","position","location","generated"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/unist-util-generated.git"},"bugs":{"url":"https://github.com/syntax-tree/unist-util-generated/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","types":"index.d.ts","devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.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":"cd1d50cd2b90f7eb72837c2db10b75b845ed9c89","homepage":"https://github.com/syntax-tree/unist-util-generated#readme","_id":"unist-util-generated@2.0.1","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==","shasum":"e37c50af35d3ed185ac6ceacb6ca0afb28a85cae","tarball":"http://registry-npm.ywwl.com/unist-util-generated/download/unist-util-generated-2.0.1.tgz","fileCount":7,"unpackedSize":10115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFf6+hjOSEwvfij+Gm+W+XLrsgaZ41+5ISBgd8OJjPkAiEAkiVJo5BuwqNiCvqBLtsBVIMFohiuqaeq56OkC01RdcU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyVi7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnfQ/9F74fSKYk4Iok9GflBEd/nDeSiaiSs56BJ624HGrqdEexl8Xr\r\nMe5Ee5PzA5MvuIfDobzwKjx/jkrM/rbUhRe+YyfHug0+db3GYShSvLcuqZiK\r\nFmxy8gDg7udfDKTfQ0sN9BIpeBl0bT+gAf0i3cAf1ZWpwF0U/H4fqyumr5xP\r\ntCFMxtbhN5ZluFCDyz3admKgRLQypKl/MZpRkD/yfLZwWNWqWlVkjx7ZGtTx\r\ndv54MFWjxP6tdGD8gV+usbTApjGNYl/9Rti9628BmhdgNkUSvbh6cUMTJUkt\r\nTm1Kw4dSjH/kRH8/SDYMJmUSdFLQALjYedQsKlnjXndBkBpg9jiRiIZwDUzO\r\nye0VEFCPhYae5tDmqaz4g7xkq2SFScvsfRSMlDL+T7NuZpjENNYkxeBT5N1+\r\nYKMSxaHRTA3l+DAjRGYNY0jOmE6kZ3ZOAKr2v/hmrKN2WrDB7/HJ02zha+TG\r\nv3IKiZLjAVa1ZH+upG/h9HKTcSVAMRFSmn5alt/xA/NkU1+0Ftpm5iAfyFVZ\r\nbB/2dDxxkjJseCB4ETnr/OGN7aujdutm3JGn6aHJlTs5+DQjphjQs5ocftrR\r\nRhizXRzglrOUcQ8EjpEV0oXEdKkJvc4xy1PF2KMfYIp4a9qzdHAW6mp5vOOL\r\nhMntSfMpRwzSYXPezZwRM4rxio6yx2x8d1s=\r\n=LZu1\r\n-----END PGP SIGNATURE-----\r\n","size":3633,"noattachment":false,"key":"/unist-util-generated/-/unist-util-generated-2.0.1.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-generated_2.0.1_1674139835278_0.949010684238438"},"_hasShrinkwrap":false,"readme":"# unist-util-generated\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 check if a node is generated.\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    *   [`generated(node)`](#generatednode)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis utility can be used to check if a node is said to be\n[generated][generated-term].\n\n## When should I use this?\n\nYou can use this utility to check is generated.\nGenerated nodes were not in the source of the original file, and thus not\nauthored by a human.\nThis info can then be used to not emit lint messages for generated content.\n\nYou might also find the utility [`unist-util-position`][unist-util-position]\nuseful to get clean positional info.\nTo display positional info to users, use\n[`unist-util-stringify-position`][unist-util-stringify-position].\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-generated\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {generated} from 'https://esm.sh/unist-util-generated@3'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {generated} from 'https://esm.sh/unist-util-generated@3?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {generated} from 'unist-util-generated'\n\ngenerated({}) // => true\n\ngenerated({position: {start: {}, end: {}}}) // => true\n\ngenerated({\n  position: {start: {line: 1, column: 1}, end: {line: 1, column: 2}}\n}) // => false\n```\n\n## API\n\nThis package exports the identifier [`generated`][generated].\nThere is no default export.\n\n### `generated(node)`\n\nCheck if `node` is generated.\n\n###### Parameters\n\n*   `node` ([`Node`][node])\n    — node to check\n\n###### Returns\n\nWhether `node` is generated (does not have positional info) (`boolean`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\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-generated@^2`,\ncompatible with Node.js 16.\n\n## Related\n\n*   [`unist-util-position`](https://github.com/syntax-tree/unist-util-position)\n    — get the position of nodes\n*   [`unist-util-source`](https://github.com/syntax-tree/unist-util-source)\n    — get the source of a node or position\n*   [`unist-util-remove-position`](https://github.com/syntax-tree/unist-util-remove-position)\n    — remove `position`s\n*   [`unist-util-stringify-position`](https://github.com/syntax-tree/unist-util-stringify-position)\n    — serialize positional info\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-generated/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/unist-util-generated/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-generated.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/unist-util-generated\n\n[downloads-badge]: https://img.shields.io/npm/dm/unist-util-generated.svg\n\n[downloads]: https://www.npmjs.com/package/unist-util-generated\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-generated\n\n[size]: https://bundlejs.com/?q=unist-util-generated\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[generated-term]: https://github.com/syntax-tree/unist#generated\n\n[unist-util-position]: https://github.com/syntax-tree/unist-util-position\n\n[unist-util-stringify-position]: https://github.com/syntax-tree/unist-util-stringify-position\n\n[generated]: #generatednode\n","publish_time":1674139835495,"_cnpm_publish_time":1674139835495,"dist-tags":{"latest":"3.0.0"}}