{"name":"hast-util-phrasing","version":"2.0.0","description":"hast utility to check if a node is phrasing content","license":"MIT","keywords":["unist","hast","hast-util","util","utility","html","category","phrasing"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/hast-util-phrasing.git"},"bugs":{"url":"https://github.com/syntax-tree/hast-util-phrasing/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","dependencies":{"hast-util-embedded":"^2.0.0","hast-util-has-property":"^2.0.0","hast-util-is-body-ok-link":"^1.0.0","hast-util-is-element":"^2.0.0"},"devDependencies":{"@types/tape":"^4.13.0","c8":"^7.0.0","hastscript":"^6.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.2","tape":"^5.0.0","type-coverage":"^2.17.3","typescript":"^4.2.4","unist-builder":"^3.0.0","xo":"^0.39.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","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,"rules":{"no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"0492e085b7f73ea5bd03d7164d73c799ee1982b5","homepage":"https://github.com/syntax-tree/hast-util-phrasing#readme","_id":"hast-util-phrasing@2.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-4rFSiFpdmTtp4aAxki6obpEbVJ85fOEN8/A8bOByoCaqRDTtd1AKTw3P/cXgVm0/RDuaWj0tSd1pTb0Jw5QfdA==","shasum":"36b526bbfd5a9e0a85bc7a96509fa591edabcd0c","tarball":"http://registry-npm.ywwl.com/hast-util-phrasing/download/hast-util-phrasing-2.0.0.tgz","fileCount":5,"unpackedSize":10245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJght/3CRA9TVsSAnZWagAAb+sP/jNh6WsQurJOfnYKlru5\nOhgdzem90flMitjkld+6VcfVQH5k3hKtB+BtcpLOimiiVQL2KDpbjOLnj5Gz\nd9bIC5Y0VwwJcOZwI8pONtpuJT/1DTNhrQjFHVw8Ffwi6ZMqm7GdVrbGzw07\n7yrzpNlMswvDGnrQRUMzH92hNetkYHp8UR/CX3h/XnMAXT1xMJsVv9bbNIzc\nClDmnZJ/7olzD++qRf/z6cQeCR2qBe5flWgLKp+Ae7h0ziA2QpEbbdjdBzav\n1C++T8cq6STN9c43c4fvb1hZ8AUwndeTTqnu+bFnmnJiwuCS0A0mV0wpCPii\n6t8F96pcSdK0CTOG2Urrcdojtw9eN8jG/drjHoTQOhYrI5cLYJyUtcul41p1\nzoflS6xCTWSi2tB+bnTQEJKXsiR3JIIM41jR2R/eaTZguFS46VKHdNIm7Kdg\nJfI9paaQNao8AQ2vRMoOF30P3jYTBEam32lHUSxnudXrAU2Vg49D86B3InOD\nM6BfLcl01UTDl99/tCNc84p2LYi+QrymWWZPXLhiJWa4fFjDxxieLUgKM/zd\nSGqa13FrFSqgQgsP7o7NL2nnUXkaurZwzNvNiARsVEeZorNC07/A6bYtquS3\n+In3J0us1JgPySoaBgrduFgmUAZa9qQhdt6X6FnmYdet54UZSKXe51rZyF8o\n1Lc0\r\n=FIG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFgPRNDtZknWu7IGDofVX14Z3I9JIIfRmKwIP/50vA5wIhAJyFdafGLrVJR3cOnyFmj+Flyk7aZR10Z2W5ARnsjvk8"}],"size":3817,"noattachment":false,"key":"/hast-util-phrasing/-/hast-util-phrasing-2.0.0.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/hast-util-phrasing_2.0.0_1619451895035_0.23711204719112167"},"_hasShrinkwrap":false,"readme":"# hast-util-phrasing\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[hast][] utility to check if a node is [*phrasing*][spec] content.\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    *   [`phrasing(value)`](#phrasingvalue)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a small utility that checks if a node is phrasing content\naccording to HTML.\n\n## When should I use this?\n\nThis utility is super niche, if you’re here you probably know what you’re\nlooking for!\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install hast-util-phrasing\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {phrasing} from 'https://esm.sh/hast-util-phrasing@3'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {phrasing} from 'https://esm.sh/hast-util-phrasing@3?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {phrasing} from 'hast-util-phrasing'\n\n// Given flow content:\nphrasing({\n  type: 'element',\n  tagName: 'div',\n  children: [{type: 'text', value: 'Alpha'}]\n})\n// => false\n\n// Given a phrasing element:\nphrasing({\n  type: 'element',\n  tagName: 'meta',\n  properties: {itemProp: 'bravo'},\n  children: []\n})\n// => true\n\n// Given a non-phrasing element:\nphrasing({\n  type: 'element',\n  tagName: 'meta',\n  properties: {charSet: 'utf8'},\n  children: []\n})\n// => false\n\n// Given text:\nphrasing({type: 'text', value: 'Delta'})\n// => true\n```\n\n## API\n\nThis package exports the identifier [`phrasing`][api-phrasing].\nThere is no default export.\n\n### `phrasing(value)`\n\nCheck if the given value is [*phrasing*][spec] content.\n\n###### Parameters\n\n*   `value` ([`Node`][node])\n    — node to check\n\n###### Returns\n\nWhether `value` is phrasing content (`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, `hast-util-phrasing@^3`,\ncompatible with Node.js 16.\n\n## Security\n\n`hast-util-phrasing` does not change the syntax tree so there are no openings\nfor [cross-site scripting (XSS)][xss] attacks.\n\n## Related\n\n*   [`hast-util-is-element`](https://github.com/syntax-tree/hast-util-is-element)\n    — check if a node is a (certain) element\n*   [`hast-util-has-property`](https://github.com/syntax-tree/hast-util-has-property)\n    — check if a node has a property\n*   [`hast-util-is-body-ok-link`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-body-ok-link)\n    — check if a node is “Body OK” link element\n*   [`hast-util-is-conditional-comment`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-conditional-comment)\n    — check if a node is a conditional comment\n*   [`hast-util-is-css-link`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-css-link)\n    — check if a node is a CSS link element\n*   [`hast-util-is-css-style`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-css-style)\n    — check if a node is a CSS style element\n*   [`hast-util-embedded`](https://github.com/syntax-tree/hast-util-embedded)\n    — check if a node is an embedded element\n*   [`hast-util-heading`](https://github.com/syntax-tree/hast-util-heading)\n    — check if a node is a heading element\n*   [`hast-util-interactive`](https://github.com/syntax-tree/hast-util-interactive)\n    — check if a node is interactive\n*   [`hast-util-is-javascript`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-is-javascript)\n    — check if a node is a JavaScript script element\n*   [`hast-util-labelable`](https://github.com/syntax-tree/hast-util-labelable)\n    — check whether a node is labelable\n*   [`hast-util-script-supporting`](https://github.com/syntax-tree/hast-util-script-supporting)\n    — check if a node is a script-supporting element\n*   [`hast-util-sectioning`](https://github.com/syntax-tree/hast-util-sectioning)\n    — check if a node is a sectioning element\n*   [`hast-util-transparent`](https://github.com/syntax-tree/hast-util-transparent)\n    — check if a node is a transparent element\n*   [`hast-util-whitespace`](https://github.com/syntax-tree/hast-util-whitespace)\n    — check if a node is inter-element whitespace\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<!-- Definitions -->\n\n[build-badge]: https://github.com/syntax-tree/hast-util-phrasing/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/hast-util-phrasing/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/hast-util-phrasing.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/hast-util-phrasing\n\n[downloads-badge]: https://img.shields.io/npm/dm/hast-util-phrasing.svg\n\n[downloads]: https://www.npmjs.com/package/hast-util-phrasing\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-phrasing\n\n[size]: https://bundlejs.com/?q=hast-util-phrasing\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[spec]: https://html.spec.whatwg.org/multipage/dom.html#phrasing-content-2\n\n[hast]: https://github.com/syntax-tree/hast\n\n[node]: https://github.com/syntax-tree/hast#nodes\n\n[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[api-phrasing]: #phrasingvalue\n","publish_time":1619451895195,"_cnpm_publish_time":1619451895195,"dist-tags":{"latest":"3.0.1"}}