{"name":"micromark-factory-whitespace","version":"1.0.0","description":"micromark factory to parse markdown whitespace (found in lots of places)","license":"MIT","keywords":["micromark","factory","whitespace"],"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"bugs":{"url":"https://github.com/micromark/micromark/issues"},"funding":[{"type":"GitHub Sponsors","url":"https://github.com/sponsors/unifiedjs"},{"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":"dev/index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-factory-space":"^1.0.0","micromark-util-character":"^1.0.0","micromark-util-symbol":"^1.0.0","micromark-util-types":"^1.0.0"},"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-factory-whitespace@1.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"integrity":"sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==","shasum":"e991e043ad376c1ba52f4e49858ce0794678621c","tarball":"http://registry-npm.ywwl.com/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0.tgz","fileCount":6,"unpackedSize":7675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0jQRCRA9TVsSAnZWagAAkMkP/iRzrNCjfj0QpmFoxWFk\nUUr553jjbpamy/Ei7iFDRHSSiZ0sdFGTcmXq01ixqta+/8AdbZc4zGzTQ4jU\nAMvD7gp0wAoARabzGJ2rULad2eDT4CdCNEcItDqb0iWMSatDrwiBw9lx35qF\nGCg43jGQgpBhvKfMl4sfPiwNNanJL/q+wYRInUiCis/oACURrdFleSj3gua9\nqXegcN+gk9ImQGmYT3nN0lTa2AlwdyOhFXBlyaDC0Di9uwSjEzJMbHawVIK0\nUnrw9Byis4tSl8wLtpQW+QNTmafcWeyJpZVg9C89W3FgeMX/8OkM/sZSWKvc\nsEMKLgjIeR7XfHySzhOfKQH+NlO5HxLd5EmJVfnXXsle4/zssZLMJ4A9wA2R\nhPWhLOy/MCvdFZbWpoa0STF0+w1vh/jhNWHI12fhAjS1GeReDlgUSt2qLJdk\nOMkvNMqATHTnWaW3GJYGJFyTPYTyeZHytsbCYWWCJ5CyEorY4rh/qEe+jHEi\njl+lF3zBjIrhDdeRQjXMVHJRFVXy5Zj72Yd7tJnhX/NIRIAmqe17vUc8xAgT\nXKb3N1PZ9gUXL2xoJQ/crhGnGghqEuy+uCDbTqwj4OsrF1HhE5o2V0EkU3aO\ntdpfI3BRnqkEPq58viPP5Bez4hO2sLo3bgWdYt+1D3SvK5f+K9K/QMyR7Wxj\nwxXa\r\n=e6Ey\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUPlVolXIKnei+2Ml9a+bRJtwds28NtPAHr2vxsnzx4AiEAtrm/MpEpp49yqP5JQ+FHmKwBZIz3ZArPUJwDXr0iOR4="}],"size":2399,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-whitespace_1.0.0_1624388625350_0.5111428600103587"},"_hasShrinkwrap":false,"readme":"# micromark-factory-whitespace\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][bundle-size-badge]][bundle-size]\n[![Sponsors][sponsors-badge]][opencollective]\n[![Backers][backers-badge]][opencollective]\n[![Chat][chat-badge]][chat]\n\n[micromark][] factory to parse [markdown line endings or spaces][ws] (found in\nlots of places).\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    *   [`factoryWhitespace(…)`](#factorywhitespace)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package exposes states to parse whitespace.\n\n## When should I use this?\n\nThis package is useful when you are making your own micromark extensions.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install micromark-factory-whitespace\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {factoryWhitespace} from 'https://esm.sh/micromark-factory-whitespace@1'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {factoryWhitespace} from 'https://esm.sh/micromark-factory-whitespace@1?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {codes, types} from 'micromark-util-symbol'\n\n// A micromark tokenizer that uses the factory:\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTitle(effects, ok, nok) {\n  return start\n\n  /** @type {State} */\n  function start(code) {\n    return markdownLineEndingOrSpace(code)\n      ? factoryWhitespace(effects, before)(code)\n      : nok(code)\n  }\n\n  // …\n}\n```\n\n## API\n\nThis module exports the identifier\n[`factoryWhitespace`][api-factory-whitespace].\nThere is no default export.\n\n### `factoryWhitespace(…)`\n\nParse spaces and tabs.\n\nThere is no `nok` parameter:\n\n*   line endings or spaces in markdown are often optional, in which case this\n    factory can be used and `ok` will be switched to whether spaces were found\n    or not\n*   one line ending or space can be detected with\n    [`markdownLineEndingOrSpace(code)`][ws] right before using\n    `factoryWhitespace`\n\n###### Parameters\n\n*   `effects` (`Effects`)\n    — context\n*   `ok` (`State`)\n    — state switched to when successful\n\n###### Returns\n\nStart state (`State`).\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`micromark-factory-whitespace@^2`, compatible with Node.js 16.\nThis package works with `micromark@^3`.\n\n## Security\n\nThis package is safe.\nSee [`security.md`][securitymd] in [`micromark/.github`][health] for how to\nsubmit a security report.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`micromark/.github`][health] for ways\nto 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, organisation, 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/micromark/micromark/workflows/main/badge.svg\n\n[build]: https://github.com/micromark/micromark/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg\n\n[coverage]: https://codecov.io/github/micromark/micromark\n\n[downloads-badge]: https://img.shields.io/npm/dm/micromark-factory-whitespace.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-factory-whitespace\n\n[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-whitespace\n\n[bundle-size]: https://bundlejs.com/?q=micromark-factory-whitespace\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[opencollective]: https://opencollective.com/unified\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[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/micromark/micromark/discussions\n\n[license]: https://github.com/micromark/micromark/blob/main/license\n\n[author]: https://wooorm.com\n\n[health]: https://github.com/micromark/.github\n\n[securitymd]: https://github.com/micromark/.github/blob/main/security.md\n\n[contributing]: https://github.com/micromark/.github/blob/main/contributing.md\n\n[support]: https://github.com/micromark/.github/blob/main/support.md\n\n[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md\n\n[ws]: https://github.com/micromark/micromark/tree/main/packages/micromark-util-character#markdownlineendingorspacecode\n\n[typescript]: https://www.typescriptlang.org\n\n[micromark]: https://github.com/micromark/micromark\n\n[api-factory-whitespace]: #factorywhitespace\n","publish_time":1624388625490,"_cnpm_publish_time":1624388625490,"dist-tags":{"latest":"2.0.1","next":"1.0.0-beta.1"}}