{"_id":"micromark-factory-whitespace","_rev":"267386","name":"micromark-factory-whitespace","description":"micromark factory to parse markdown whitespace (found in lots of places)","dist-tags":{"latest":"1.0.0","next":"1.0.0-beta.1"},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"time":{"modified":"2023-03-27T19:09:41.000Z","created":"2021-06-07T09:26:03.941Z","1.0.0":"2021-06-22T19:03:45.490Z","1.0.0-beta.1":"2021-06-20T12:13:01.009Z","1.0.0-alpha.3":"2021-06-16T17:18:11.609Z","1.0.0-alpha.2":"2021-06-07T13:35:44.447Z","1.0.0-alpha.1":"2021-06-07T09:26:03.941Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"versions":{"1.0.0":{"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":{"shasum":"e991e043ad376c1ba52f4e49858ce0794678621c","size":2399,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-whitespace_1.0.0_1624388625350_0.5111428600103587"},"_hasShrinkwrap":false,"publish_time":1624388625490,"_cnpm_publish_time":1624388625490,"_cnpmcore_publish_time":"2021-12-14T05:43:57.140Z"},"1.0.0-beta.1":{"name":"micromark-factory-whitespace","version":"1.0.0-beta.1","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-beta.1","micromark-util-character":"^1.0.0-beta.1","micromark-util-symbol":"^1.0.0-beta.1","micromark-util-types":"1.0.0-beta.1"},"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},"readmeFilename":"readme.md","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-factory-whitespace@1.0.0-beta.1","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"8ae96b2c33229279b5f9e8b441395b1aff10c34f","size":2407,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0-beta.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0-beta.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-whitespace_1.0.0-beta.1_1624191180863_0.3466807580812461"},"_hasShrinkwrap":false,"publish_time":1624191181009,"_cnpm_publish_time":1624191181009,"_cnpmcore_publish_time":"2021-12-14T05:43:57.393Z"},"1.0.0-alpha.3":{"name":"micromark-factory-whitespace","version":"1.0.0-alpha.3","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.3","micromark-util-character":"^1.0.0-alpha.3","micromark-util-symbol":"^1.0.0-alpha.3","micromark-util-types":"1.0.0-alpha.3"},"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},"readmeFilename":"readme.md","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-factory-whitespace@1.0.0-alpha.3","_nodeVersion":"16.2.0","_npmVersion":"7.16.0","dist":{"shasum":"fa46ec9cab0ebf98d1026fab6a3c60aeb47df82c","size":2408,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0-alpha.3.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0-alpha.3.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-whitespace_1.0.0-alpha.3_1623863891365_0.9463154995478329"},"_hasShrinkwrap":false,"publish_time":1623863891609,"_cnpm_publish_time":1623863891609,"_cnpmcore_publish_time":"2021-12-14T05:43:57.610Z"},"1.0.0-alpha.2":{"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},"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":{"shasum":"4b7d2fc371cebea9a45569664f669e67c2d1cbfa","size":2408,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0-alpha.2.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0-alpha.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_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,"_cnpmcore_publish_time":"2021-12-14T05:43:57.816Z"},"1.0.0-alpha.1":{"name":"micromark-factory-whitespace","version":"1.0.0-alpha.1","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"}],"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.1","micromark-util-character":"^1.0.0-alpha.1","micromark-util-symbol":"^1.0.0-alpha.1","micromark-util-types":"1.0.0-alpha.1"},"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-alpha.1","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"f313abbf9f6740023a5a02b3e0e6b4a2a60490d8","size":2400,"noattachment":false,"key":"/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0-alpha.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-whitespace/download/micromark-factory-whitespace-1.0.0-alpha.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-whitespace_1.0.0-alpha.1_1623057963829_0.35649554455454924"},"_hasShrinkwrap":false,"publish_time":1623057963941,"_cnpm_publish_time":1623057963941,"_cnpmcore_publish_time":"2021-12-14T05:43:58.066Z"}},"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","_attachments":{},"homepage":"https://github.com/micromark/micromark/tree/main#readme","bugs":{"url":"https://github.com/micromark/micromark/issues"},"license":"MIT"}