{"_id":"@accuser/unist-util-type-guards","_rev":"4-f8d9f00b60a450536639e4ff7910fe96","name":"@accuser/unist-util-type-guards","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@accuser/unist-util-type-guards","version":"1.0.0","keywords":["unist","typescript","type guard"],"author":{"url":"https://github.com/accuser","name":"Matthew Gibbons","email":"mhgibbons@me.com"},"license":"MIT","_id":"@accuser/unist-util-type-guards@1.0.0","maintainers":[{"name":"accuser","email":"mhgibbons@me.com"}],"homepage":"https://github.com/accuser/unist-util-type-guards#readme","bugs":{"url":"https://github.com/accuser/unist-util-type-guards/issues"},"dist":{"shasum":"6a107a158f1d595bc3d80f790f2f394860d2078f","tarball":"https://registry.npmjs.org/@accuser/unist-util-type-guards/-/unist-util-type-guards-1.0.0.tgz","fileCount":18,"integrity":"sha512-tyKzAzHC/ILXyIe/5rZodywmKzrxlwA7RfXHzuRrmhyeTq8gclNGom97lw9sjo0DGN8A+8zMr/1DXAJSO4fDjw==","signatures":[{"sig":"MEUCIAQgk3kHc+MyISMKVxmYe+itY9oyXhaS5gagDxFlU/1eAiEAsoti3Yd2djRnBHoNQftCnOahua57hrx7CZu5Du0swJQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6289},"main":"dist/index.js","type":"module","_from":"file:accuser-unist-util-type-guards-1.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./package.json":"./package.json"},"scripts":{"lint":"eslint","test":"vitest","build":"duel","format":"prettier --write {src,test}/**/*.{js,ts}"},"_npmUser":{"name":"accuser","email":"mhgibbons@me.com"},"_resolved":"/tmp/5c5c2ffaf2d420666fd33e64760aa38c/accuser-unist-util-type-guards-1.0.0.tgz","_integrity":"sha512-tyKzAzHC/ILXyIe/5rZodywmKzrxlwA7RfXHzuRrmhyeTq8gclNGom97lw9sjo0DGN8A+8zMr/1DXAJSO4fDjw==","repository":{"url":"git+https://github.com/accuser/unist-util-type-guards.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript type guards for `unist` nodes.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.7.0","eslint":"^9.10.0","vitest":"^2.1.1","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.5","@knighted/duel":"^1.0.8","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^8.6.0","@typescript-eslint/eslint-plugin":"^8.6.0"},"peerDependencies":{"@types/unist":"^3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/unist-util-type-guards_1.0.0_1726750759576_0.04182143195461818","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@accuser/unist-util-type-guards","version":"1.0.1","keywords":["unist","typescript","type guard"],"author":{"url":"https://github.com/accuser","name":"Matthew Gibbons","email":"mhgibbons@me.com"},"license":"MIT","_id":"@accuser/unist-util-type-guards@1.0.1","maintainers":[{"name":"accuser","email":"mhgibbons@me.com"}],"homepage":"https://github.com/accuser/unist-util-type-guards#readme","bugs":{"url":"https://github.com/accuser/unist-util-type-guards/issues"},"dist":{"shasum":"b842fc3c097f1f58345dfadd7b576c764d42347a","tarball":"https://registry.npmjs.org/@accuser/unist-util-type-guards/-/unist-util-type-guards-1.0.1.tgz","fileCount":22,"integrity":"sha512-s3nXyg7LA2VWeVoT6sbhdl8pIEFidTx5HAk/J7w/yvu18ZASxWbSLimJBpvY/pTQMyrAVT0+Efa76Y5S4GZZwA==","signatures":[{"sig":"MEUCIGSnLlhetexqnGFkMg0CClZ7+cLDEpv9bzvfh0xVh2lwAiEAgyfJJJL6MtWId3fEKcenRLXtQc+ZVrYSpTY9tcASdbU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7030},"main":"dist/index.js","type":"module","_from":"file:accuser-unist-util-type-guards-1.0.1.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"lint":"eslint","test":"vitest","build":"pnpm build:cjs && pnpm build:esm","format":"prettier --write {src,test}/**/*.{js,ts}","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc"},"_npmUser":{"name":"accuser","email":"mhgibbons@me.com"},"_resolved":"/tmp/5971b8cf253fef8dc5d9a251840ba20f/accuser-unist-util-type-guards-1.0.1.tgz","_integrity":"sha512-s3nXyg7LA2VWeVoT6sbhdl8pIEFidTx5HAk/J7w/yvu18ZASxWbSLimJBpvY/pTQMyrAVT0+Efa76Y5S4GZZwA==","repository":{"url":"git+https://github.com/accuser/unist-util-type-guards.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript type guards for `unist` nodes.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.7.0","eslint":"^9.10.0","vitest":"^2.1.1","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.5","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^8.6.0","@typescript-eslint/eslint-plugin":"^8.6.0"},"peerDependencies":{"@types/unist":"^3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/unist-util-type-guards_1.0.1_1726775010811_0.1410055648739792","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@accuser/unist-util-type-guards","version":"1.0.2","keywords":["unist","typescript","type guard"],"author":{"url":"https://github.com/accuser","name":"Matthew Gibbons","email":"mhgibbons@me.com"},"license":"MIT","_id":"@accuser/unist-util-type-guards@1.0.2","maintainers":[{"name":"accuser","email":"mhgibbons@me.com"}],"homepage":"https://github.com/accuser/unist-util-type-guards#readme","bugs":{"url":"https://github.com/accuser/unist-util-type-guards/issues"},"dist":{"shasum":"9ece0087206a0a6df7286b20b3022723b668ef87","tarball":"https://registry.npmjs.org/@accuser/unist-util-type-guards/-/unist-util-type-guards-1.0.2.tgz","fileCount":22,"integrity":"sha512-IqiyxHAhQBj8aKveD/+/P+3R4jY5O7aVr9NWafLug+mq0p7xFvVJZEV1TMt4f+dSIWL2xFQRjVOLXZaj8hr34w==","signatures":[{"sig":"MEYCIQDcru7DY9puv94F/3j2zEvAi19cFB4HTZh1fh3jvNj0SgIhANbcp+54YHnU+9ArsA46h5lovxx+2BVQKAE7YVyWFB3M","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7030},"main":"dist/index.js","type":"module","_from":"file:accuser-unist-util-type-guards-1.0.2.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"lint":"eslint","test":"vitest","build":"pnpm build:cjs && pnpm build:esm","format":"prettier --write {src,test}/**/*.{js,ts}","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc"},"_npmUser":{"name":"accuser","email":"mhgibbons@me.com"},"_resolved":"/tmp/1d1be9c44d69136c62b3d4e0754e4d61/accuser-unist-util-type-guards-1.0.2.tgz","_integrity":"sha512-IqiyxHAhQBj8aKveD/+/P+3R4jY5O7aVr9NWafLug+mq0p7xFvVJZEV1TMt4f+dSIWL2xFQRjVOLXZaj8hr34w==","repository":{"url":"git+https://github.com/accuser/unist-util-type-guards.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript type guards for `unist` nodes.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.7.0","eslint":"^9.10.0","vitest":"^2.1.1","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.5","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^8.6.0","@typescript-eslint/eslint-plugin":"^8.6.0"},"peerDependencies":{"@types/unist":"^3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/unist-util-type-guards_1.0.2_1726775719978_0.7966128137848298","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@accuser/unist-util-type-guards","version":"1.0.3","keywords":["unist","typescript","type guard"],"author":{"url":"https://github.com/accuser","name":"Matthew Gibbons","email":"mhgibbons@me.com"},"license":"MIT","_id":"@accuser/unist-util-type-guards@1.0.3","maintainers":[{"name":"accuser","email":"mhgibbons@me.com"}],"homepage":"https://github.com/accuser/unist-util-type-guards#readme","bugs":{"url":"https://github.com/accuser/unist-util-type-guards/issues"},"dist":{"shasum":"d1ec1521c0c08cd7e42ba2e005f19eee0456ab94","tarball":"https://registry.npmjs.org/@accuser/unist-util-type-guards/-/unist-util-type-guards-1.0.3.tgz","fileCount":22,"integrity":"sha512-zZdN0AAC02phu9iM5sWa3qA1/4+kxCAubEOjXpg3e3PPMLzr+sXjjgzIVY8BHOX5x+jWNtQUGnhsO8WXibNAkA==","signatures":[{"sig":"MEQCIDg4II1SXrp9v+0xyRIVvda+R7cIkWOvL+ERS0JlJdshAiBOpKGYMqv+CMm3GRtcWX2zeYfK0Al0JbeQnrMbUDk0Xw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11560},"main":"dist/index.js","type":"module","_from":"file:accuser-unist-util-type-guards-1.0.3.tgz","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"lint":"eslint","test":"vitest","build":"pnpm build:cjs && pnpm build:esm","format":"prettier --write {src,test}/**/*.{js,ts}","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc"},"_npmUser":{"name":"accuser","email":"mhgibbons@me.com"},"_resolved":"/tmp/6233836c8c73b7706336223964d30d07/accuser-unist-util-type-guards-1.0.3.tgz","_integrity":"sha512-zZdN0AAC02phu9iM5sWa3qA1/4+kxCAubEOjXpg3e3PPMLzr+sXjjgzIVY8BHOX5x+jWNtQUGnhsO8WXibNAkA==","repository":{"url":"git+https://github.com/accuser/unist-util-type-guards.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript type guards for `unist` nodes.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.7.0","eslint":"^9.10.0","vitest":"^2.1.1","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.5","eslint-config-prettier":"^9.1.0","@typescript-eslint/parser":"^8.6.0","@typescript-eslint/eslint-plugin":"^8.6.0"},"peerDependencies":{"@types/unist":"^3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/unist-util-type-guards_1.0.3_1726819937729_0.1859201542023765","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@accuser/unist-util-type-guards","version":"1.1.0","description":"TypeScript type guards for `unist` nodes.","type":"module","main":"dist/index.js","exports":{".":{"default":"./dist/index.js","import":{"default":"./dist/index.js","types":"./dist/index.d.ts"},"require":{"default":"./dist/index.cjs","types":"./dist/index.d.ts"}},"./package.json":"./package.json"},"keywords":["unist","typescript","type guard"],"author":{"name":"Matthew Gibbons","email":"mhgibbons@me.com","url":"https://github.com/accuser"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/accuser/unist-util-type-guards.git"},"bugs":{"url":"https://github.com/accuser/unist-util-type-guards/issues"},"peerDependencies":{"@types/unist":"^3.0.3"},"devDependencies":{"@types/node":"^22.5.5","@typescript-eslint/eslint-plugin":"^8.6.0","@typescript-eslint/parser":"^8.6.0","eslint":"^9.11.0","eslint-config-prettier":"^9.1.0","prettier":"^3.3.3","tslib":"^2.7.0","typescript":"^5.6.2","vitest":"^2.1.1"},"scripts":{"build":"pnpm build:cjs && pnpm build:esm","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc","format":"prettier --write {src,test}/**/*.{js,ts}","lint":"eslint","test":"vitest"},"_id":"@accuser/unist-util-type-guards@1.1.0","types":"./dist/index.d.ts","homepage":"https://github.com/accuser/unist-util-type-guards#readme","_integrity":"sha512-yt3kSD1iuzWPHg+lQAxGJX5yAsNUaYJeGSPWS9VwRKEIgVAWMwa/bLuWdFc8ZstZZaMT9w3GiErQ0AdrtNrOwg==","_resolved":"/tmp/2e6e263ee7e215aa62fd170d4e070415/accuser-unist-util-type-guards-1.1.0.tgz","_from":"file:accuser-unist-util-type-guards-1.1.0.tgz","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-yt3kSD1iuzWPHg+lQAxGJX5yAsNUaYJeGSPWS9VwRKEIgVAWMwa/bLuWdFc8ZstZZaMT9w3GiErQ0AdrtNrOwg==","shasum":"34fbdfd9959c053ce251ba513f82da046a9f4ca7","tarball":"https://registry.npmjs.org/@accuser/unist-util-type-guards/-/unist-util-type-guards-1.1.0.tgz","fileCount":34,"unpackedSize":16631,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLmjVIGjT2N6acatV7Qs91GpHfEWi2Qs0agniI/1qSaAiAO1SrJfzjEMt1spfnRGmerJIWSlINR/Ceb21ah9jAMEw=="}]},"_npmUser":{"name":"accuser","email":"mhgibbons@me.com"},"directories":{},"maintainers":[{"name":"accuser","email":"mhgibbons@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unist-util-type-guards_1.1.0_1727016441584_0.8494334160818617"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-19T12:59:19.463Z","modified":"2024-09-22T14:47:21.946Z","1.0.0":"2024-09-19T12:59:19.746Z","1.0.1":"2024-09-19T19:43:31.064Z","1.0.2":"2024-09-19T19:55:20.131Z","1.0.3":"2024-09-20T08:12:17.940Z","1.1.0":"2024-09-22T14:47:21.763Z"},"bugs":{"url":"https://github.com/accuser/unist-util-type-guards/issues"},"author":{"name":"Matthew Gibbons","email":"mhgibbons@me.com","url":"https://github.com/accuser"},"license":"MIT","homepage":"https://github.com/accuser/unist-util-type-guards#readme","keywords":["unist","typescript","type guard"],"repository":{"type":"git","url":"git+https://github.com/accuser/unist-util-type-guards.git"},"description":"TypeScript type guards for `unist` nodes.","maintainers":[{"name":"accuser","email":"mhgibbons@me.com"}],"readme":"# TypeScript Type Guards for Unist Nodes\n\nThis package provides TypeScript type guards for [Unist](https://github.com/syntax-tree/unist) nodes.\n\n## Installation\n\n```sh\nnpm install @accuser/unist-util-type-guards\n```\n\n## Usage\n\n```ts\nimport { isNode } from '@accuser/unist-util-type-guards';\n\nconst node = {\n  type: 'leaf',\n  value: 'Leaf'\n};\n\nisNode(node); // true, node is Node\nisLiteral(node); // true, node is Literal\nisParent(node); // false\n```\n\n## API\n\nThis package exports the following identifiers:\n\n- [`isLiteral`](#isliteralvalue-unknown-node-is-literal)\n- [`isMonoparous`](#ismonoparousvalue-unknown-value-is-parent)\n- [`isMultiparous`](#ismultiparousvalue-unknown-value-is-parent)\n- [`isNode`](#isnodevalue-unknown-value-is-node)\n- [`isNulliparous`](#isnulliparousvalue-unknown-value-is-parent)\n- [`isParent`](#isparentvalue-unknown-value-is-parent)\n\nThere is no default export.\n\n### `isLiteral(value: unknown): node is Literal`\n\nTest is the given value is a valid [`Literal`](https://github.com/syntax-tree/unist#literal).\n\n###### Parameters\n\n* `value` (`unknown`)\n\t- value to check.\n\n###### Returns\n\nReturns `true` if `value` is a valid [`Literal`](https://github.com/syntax-tree/unist#literal).\n\n### `isMonoparous(value: unknown): value is Parent`\n\nTest is a given value is a valid [`Parent`](https://github.com/syntax-tree/unist#parent) with exactly one child.\n\n###### Parameters\n\n* `value` (`unknown`)\n\t- value to check.\n\n###### Returns\n\nReturns `true` if `value` is a valid [`Parent`](https://github.com/syntax-tree/unist#parent) with exactly one child.\n\n### `isMultiparous(value: unknown): value is Parent`\n\nTest is a given value is a valid [`Parent`](https://github.com/syntax-tree/unist#parent) with more than one child.\n\n###### Parameters\n\n* `value` (`unknown`)\n\t- value to check.\n\n###### Returns\n\nReturns `true` if `value` is a valid [`Parent`](https://github.com/syntax-tree/unist#parent) with more than one child.\n\n### `isNode(value: unknown): value is Node`\n\nTest is a given value is a valid [`Node`](https://github.com/syntax-tree/unist#node).\n\n###### Parameters\n\n* `value` (`unknown`)\n\t- value to check.\n\n###### Returns\n\nReturns `true` if `value` is a valid [`Node`](https://github.com/syntax-tree/unist#node).\n\n### `isNulliparous(value: unknown): value is Parent`\n\nTest is a given value is a valid [`Parent`](https://github.com/syntax-tree/unist#parent) with no children.\n\n###### Parameters\n\n* `value` (`unknown`)\n\t- value to check.\n\n###### Returns\n\nReturns `true` if `value` is a valid [`Parent`](https://github.com/syntax-tree/unist#parent) with no children.\n\n### `isParent(value: unknown): value is Parent`\n\nTest is a given value is a valid [`Parent`](https://github.com/syntax-tree/unist#parent).\n\n###### Parameters\n\n* `node` (`unknown`)\n\t- value to check.\n\n###### Returns\n\nReturns `true` if `value` is a valid [`Parent`](https://github.com/syntax-tree/unist#parent).\n\n## Tests\n\n```sh\nnpm test\n```\n\n## License\n\n[MIT](https://raw.githubusercontent.com/accuser/unist-util-type-guards/main/LICENSE)\n","readmeFilename":"README.md"}