{"name":"mdast-squeeze-paragraphs","version":"5.2.1","description":"mdast utility to remove empty paragraphs from a tree","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","squeeze","remove","empty","paragraph","whitespace","tree","transform","transformation","clean"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-squeeze-paragraphs.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-squeeze-paragraphs/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Eugene Sharygin","email":"eush77@gmail.com"},"contributors":[{"name":"Eugene Sharygin","email":"eush77@gmail.com"},{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","unist-util-visit":"^4.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","tape":"^5.0.0","tsd":"^0.25.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-builder":"^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,"rules":{"@typescript-eslint/ban-types":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"28fc4d5bbe1c3124f19a5c89ebe23624924d3183","homepage":"https://github.com/syntax-tree/mdast-squeeze-paragraphs#readme","_id":"mdast-squeeze-paragraphs@5.2.1","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-npINYQrt0E5AvSvM7ZxIIyrG/7DX+g8jKWcJMudrcjI+b1eNOKbbu+wTo6cKvy5IzH159IPfpWoRVH7kwEmnug==","shasum":"4f687231c9caf1073c4511557adae35414615d9e","tarball":"http://registry-npm.ywwl.com/mdast-squeeze-paragraphs/download/mdast-squeeze-paragraphs-5.2.1.tgz","fileCount":7,"unpackedSize":10432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFx5XxVhq5MjR/n0qR1fzC5ygfitOAp6Wxt35fo21yZgIgB8Y7mU+kR0b3c8fVdCIKM6HAGTCO5AGoOkewyWHDNe4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0SF6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFnBAAhrbFHpcDjnUFV6TJZQNl3jwNAJMhNORw1tfaPYsFPWKq5MLp\r\nr5X68Bwt0rBWk8F4ogqweyot6EpMaL45Ee7cUrCHHBuqoN3LLqfsaxvhaNLv\r\n3qLLxhsQR6hb6yFGOBLMH/3JpDY6X3IbcZOg/3iVWPuPSBROFbwvW/KIdnnK\r\nMK0C7p2xHux9lzBBAtILqI3qgu1LqmpzUK4F22ZeSLRR6tPePvoGDrXnKLHa\r\nQ+h0FzwIFwr8ucNeI5wp20Na5W8Kd4o5Z3e6FNFbYjrN8EcF9TnB9KBSFm5x\r\nZ/ex7rjpeQCdOsNegckxwYpMElAQegwEOqaPytgAkVfWl3Ud/L491P6RYn1F\r\n/Z87gziMejr4jWl2RuWVGFyqA0T8OBUEUgra0JQJOqHuBUuHtyVLG/xDIoEt\r\nIIF0ON+7lSP7qsZNP6B6Ofc7AtFA6g6Fw+IguGa17CKNTxGELgo54wMKyoMd\r\nXYT0PRV6JxlBZ/ETFpWQYursBIkP+FEpQLF1wZEDfg2ry0U385/cPZzaB8uv\r\n45uW1fXe0rFtCIUSNHDd5VpOT5eWHNDNgcP2CVyjaQ10Jo3vd65MInjhW+5D\r\nBPlIUNt579Qt59r1RcyfnX+GjNCZgmFL3xtDUk7jbaQWgwJWZ8s5dzKIEXAS\r\nqvsuIag/4i594CYE3VLvW80DjTsCzjSkMDI=\r\n=IjGU\r\n-----END PGP SIGNATURE-----\r\n","size":4077,"noattachment":false,"key":"/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-5.2.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/mdast-squeeze-paragraphs_5.2.1_1674649978528_0.4256694053272658"},"_hasShrinkwrap":false,"readme":"# mdast-squeeze-paragraphs\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[mdast][] utility to remove empty paragraphs.\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    *   [`squeezeParagraphs(tree)`](#squeezeparagraphstree)\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 utility that removes empty paragraphs, left over from other\noperations, from the tree.\nParagraphs are considered empty if they do not contain non-whitespace\ncharacters.\n\n## When should I use this?\n\nProbably never!\nYou should try to clean your trees yourself.\n\nA plugin, [`remark-squeeze-paragraphs`][remark-squeeze-paragraphs], exists that\ndoes the same but for [remark][].\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install mdast-squeeze-paragraphs\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {squeezeParagraphs} from 'https://esm.sh/mdast-squeeze-paragraphs@6'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {squeezeParagraphs} from 'https://esm.sh/mdast-squeeze-paragraphs@6?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {squeezeParagraphs} from 'mdast-squeeze-paragraphs'\nimport {u} from 'unist-builder'\n\nconst tree = u('root', [\n  u('paragraph', []),\n  u('paragraph', [u('text', 'Alpha')]),\n  u('paragraph', [u('text', ' ')])\n])\n\nsqueezeParagraphs(tree)\n\nconsole.dir(tree, {depth: null})\n```\n\nYields:\n\n```js\n{ type: 'root',\n  children:\n   [ { type: 'paragraph',\n       children: [ { type: 'text', value: 'Alpha' } ] } ] }\n```\n\n## API\n\nThis package exports the identifier\n[`squeezeParagraphs`][api-squeezeparagraphs].\nThere is no default export.\n\n### `squeezeParagraphs(tree)`\n\nRemove empty paragraphs in `tree`.\n\n###### Parameters\n\n*   `tree` ([`Node`][node])\n    — tree to change\n\n###### Returns\n\nNothing (`undefined`).\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,\n`mdast-squeeze-paragraphs@^6`, compatible with Node.js 16.\n\n## Security\n\nUse of `mdast-squeeze-paragraphs` does not involve **[hast][]** or user content\nso there are no openings for [cross-site scripting (XSS)][xss] attacks.\n\n## Related\n\n*   [`remark-squeeze-paragraphs`][remark-squeeze-paragraphs]\n    — remark plugin\n*   [`mdast-util-compact`](https://github.com/syntax-tree/mdast-util-compact)\n    — make a tree compact\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] © Eugene Sharygin\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/syntax-tree/mdast-squeeze-paragraphs/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/mdast-squeeze-paragraphs/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-squeeze-paragraphs.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/mdast-squeeze-paragraphs\n\n[downloads-badge]: https://img.shields.io/npm/dm/mdast-squeeze-paragraphs.svg\n\n[downloads]: https://www.npmjs.com/package/mdast-squeeze-paragraphs\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-squeeze-paragraphs\n\n[size]: https://bundlejs.com/?q=mdast-squeeze-paragraphs\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[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[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[hast]: https://github.com/syntax-tree/hast\n\n[mdast]: https://github.com/syntax-tree/mdast\n\n[node]: https://github.com/syntax-tree/mdast#node\n\n[remark]: https://github.com/remarkjs/remark\n\n[remark-squeeze-paragraphs]: https://github.com/remarkjs/remark-squeeze-paragraphs\n\n[api-squeezeparagraphs]: #squeezeparagraphstree\n","publish_time":1674649978732,"_cnpm_publish_time":1674649978732,"dist-tags":{"latest":"6.0.0"}}