{"name":"micromark-factory-whitespace","version":"1.0.0-alpha.2","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-alpha.2","micromark-util-character":"^1.0.0-alpha.2","micromark-util-symbol":"^1.0.0-alpha.2","micromark-util-types":"1.0.0-alpha.2"},"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},"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\nmicromark factory to parse [markdown line endings or spaces][ws] (found in lots\nof places).\n\n## Contents\n\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`factoryWhitespace(…)`](#factorywhitespace)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install micromark-factory-whitespace\n```\n\n## Use\n\n```js\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {codes} from 'micromark-util-symbol/codes'\nimport {types} from 'micromark-util-symbol/types'\n\n// A micromark tokenizer that uses the factory:\n/** @type {Tokenizer} */\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 following identifiers: `factoryWhitespace`.\nThere is no default export.\n\n### `factoryWhitespace(…)`\n\nNote that there 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 `factoryWhitespace`\n\n###### Parameters\n\n*   `effects` (`Effects`) — Context\n*   `ok` (`State`) — State switched to when successful\n\n###### Returns\n\n`State`.\n\n## Security\n\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/bundlephobia/minzip/micromark-factory-whitespace.svg\n\n[bundle-size]: https://bundlephobia.com/result?p=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[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/HEAD/security.md\n\n[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md\n\n[support]: https://github.com/micromark/.github/blob/HEAD/support.md\n\n[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md\n\n[ws]: https://github.com/micromark/micromark/tree/main/packages/micromark-util-character#markdownlineendingorspacecode\n","readmeFilename":"readme.md","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-factory-whitespace@1.0.0-alpha.2","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-ImWVxNtVxi+S3JOmSnV/7sGlLo3nh8uJABPYSvgHFoxEUy9Ueg3HSN3HfHCVpjzZ6KrHb/fShUWsKHdA9nQP3g==","shasum":"4b7d2fc371cebea9a45569664f669e67c2d1cbfa","tarball":"http://registry-npm.ywwl.com/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0-alpha.2.tgz","fileCount":6,"unpackedSize":7714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgviCwCRA9TVsSAnZWagAApfIP/iGxjdrUNQvXE4TIVhQ8\n3pZ3/PeZ6FEHZ1dnsokyx0GjV1szFUFr2PxfcKOoTrtggG+YSkrAB5raZ0uw\n0EK3xDiDxVx5dooqmrixXwElUAjbqDTyElU3NAcVYWYqe5Ks8WT/Wa3l/bUW\n++1sn22cpzAK1o+gzb3IiC5oYl2SkUpsyUnVdsD962nSEA4sggWXKC2XN6uk\nNw40AoFjRVT6kau2vk0NtsJJZ43MrhQWhFgVsKR7aAnXQIY9+oz/V/7x/Cny\nvxakqf3QJg2UvydJ4l6T7/3VoprfRkO1Aq/TftMwOkXdXuRllSj1ziRfyvVq\nuayxDBhxjX5dt9+k5YU6aPKU5TjST7yq4f9A3JpXuBWgMEGrutlniWoWSURP\ngcZBLX785LjtBYd+BdCfMZTJUrnS0XFAnT/yLSrag9EitCrakpAtxmgOoPsi\nv90vqooVwu868pxe408rwrzeSwvk31cImptY9kEZNoAiL9iLO6qjx6PonWKJ\ngPJQWhtzqb9H2MBAQ5Zb/XQoYinfUsHLK7n9pCZykZ7VIDF1XPtaPWXLr4oA\nOJrpFTtcc4fQtNmU2os34Y8i95x2Pc2JsaXky5ZSMdswLk0L9Rga0tNDf5lr\nb8MjYDCGREkOeidz94WZaAVO59Wcp7Co2otplyh+FB7G59TTlnKcYGzUYfiC\nlaVP\r\n=+GqR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCNdtW13QdGFjQYu6kOaEb51MuQVfu9oiemg/CWQxJcAiB4nVEAH7JKm4rRpu4zV5U0lbfJ3OlugDqBJRfZQnje0A=="}],"size":2408,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0-alpha.2.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-alpha.2_1623072944282_0.8747724319951555"},"_hasShrinkwrap":false,"publish_time":1623072944447,"_cnpm_publish_time":1623072944447,"dist-tags":{"latest":"2.0.1","next":"1.0.0-beta.1"}}