{"_id":"micromark-factory-title","_rev":"267381","name":"micromark-factory-title","description":"micromark factory to parse markdown titles (found in resources, definitions)","dist-tags":{"latest":"1.0.2","next":"1.0.0-beta.1"},"maintainers":[{"name":"wooorm","email":""}],"time":{"modified":"2023-03-27T19:09:39.000Z","created":"2021-06-07T09:26:00.619Z","1.0.2":"2021-10-09T07:39:56.813Z","1.0.1":"2021-10-02T13:05:16.411Z","1.0.0":"2021-06-22T19:03:42.162Z","1.0.0-beta.1":"2021-06-20T12:12:57.539Z","1.0.0-alpha.3":"2021-06-16T17:18:07.484Z","1.0.0-alpha.2":"2021-06-07T13:35:41.285Z","1.0.0-alpha.1":"2021-06-07T09:26:00.619Z"},"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.2":{"name":"micromark-factory-title","version":"1.0.2","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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","uvu":"^0.5.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},"gitHead":"77d9d891dd5279ac0715b337a03ec0cc5080c92f","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-factory-title@1.0.2","_nodeVersion":"16.9.0","_npmVersion":"7.23.0","dist":{"shasum":"7e09287c3748ff1693930f176e1c4a328382494f","size":2896,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.2_1633765196637_0.8257944326907161"},"_hasShrinkwrap":false,"publish_time":1633765196813,"_cnpm_publish_time":1633765196813,"_cnpmcore_publish_time":"2021-12-14T05:43:48.929Z"},"1.0.1":{"name":"micromark-factory-title","version":"1.0.1","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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","power-assert":"^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},"gitHead":"b3dc6b994997f2afe832e472d9cec31482c77f7a","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-factory-title@1.0.1","_nodeVersion":"16.9.0","_npmVersion":"7.23.0","dist":{"shasum":"04a8efeb59b4965f87eaf15a8f5dc97df48946e5","size":2883,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.1_1633179916273_0.4305357829922811"},"_hasShrinkwrap":false,"publish_time":1633179916411,"_cnpm_publish_time":1633179916411,"_cnpmcore_publish_time":"2021-12-14T05:43:49.137Z"},"1.0.0":{"name":"micromark-factory-title","version":"1.0.0","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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-title@1.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"708f7a8044f34a898c0efdb4f55e4da66b537273","size":2875,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.0_1624388621824_0.9858630443211356"},"_hasShrinkwrap":false,"publish_time":1624388622162,"_cnpm_publish_time":1624388622162,"_cnpmcore_publish_time":"2021-12-14T05:43:49.374Z"},"1.0.0-beta.1":{"name":"micromark-factory-title","version":"1.0.0-beta.1","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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-title@1.0.0-beta.1","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"2f5bdb2da3bdb4f4c040dcd15e8c3cc37f469e09","size":2881,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.0-beta.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.0-beta.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.0-beta.1_1624191177406_0.9159444452856238"},"_hasShrinkwrap":false,"publish_time":1624191177539,"_cnpm_publish_time":1624191177539,"_cnpmcore_publish_time":"2021-12-14T05:43:49.592Z"},"1.0.0-alpha.3":{"name":"micromark-factory-title","version":"1.0.0-alpha.3","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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-title@1.0.0-alpha.3","_nodeVersion":"16.2.0","_npmVersion":"7.16.0","dist":{"shasum":"76125f755970d655e53eeac5eafb451fd8a84566","size":2881,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.0-alpha.3.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.0-alpha.3.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.0-alpha.3_1623863887335_0.9729327857156982"},"_hasShrinkwrap":false,"publish_time":1623863887484,"_cnpm_publish_time":1623863887484,"_cnpmcore_publish_time":"2021-12-14T05:43:49.771Z"},"1.0.0-alpha.2":{"name":"micromark-factory-title","version":"1.0.0-alpha.2","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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-title@1.0.0-alpha.2","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"265b56a81b5904288850c6027bff4ef1816ebecf","size":2881,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.0-alpha.2.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.0-alpha.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.0-alpha.2_1623072941158_0.04815877239326549"},"_hasShrinkwrap":false,"publish_time":1623072941285,"_cnpm_publish_time":1623072941285,"_cnpmcore_publish_time":"2021-12-14T05:43:49.985Z"},"1.0.0-alpha.1":{"name":"micromark-factory-title","version":"1.0.0-alpha.1","description":"micromark factory to parse markdown titles (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","title"],"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-title@1.0.0-alpha.1","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"b24a37260853298560bd8b019c276c814cd287c3","size":2874,"noattachment":false,"key":"/micromark-factory-title/-/micromark-factory-title-1.0.0-alpha.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-title/download/micromark-factory-title-1.0.0-alpha.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-factory-title_1.0.0-alpha.1_1623057960506_0.7495989077385858"},"_hasShrinkwrap":false,"publish_time":1623057960619,"_cnpm_publish_time":1623057960619,"_cnpmcore_publish_time":"2021-12-14T05:43:50.200Z"}},"readme":"# micromark-factory-title\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 titles (found in resources, definitions).\n\n## Contents\n\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`factoryTitle(…)`](#factorytitle)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install micromark-factory-title\n```\n\n## Use\n\n```js\nimport {factoryTitle} from 'micromark-factory-title'\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 tokenizeDefinition(effects, ok, nok) {\n  return start\n\n  // …\n\n  /** @type {State} */\n  function before(code) {\n    if (\n      code === codes.quotationMark ||\n      code === codes.apostrophe ||\n      code === codes.leftParenthesis\n    ) {\n      return factoryTitle(\n        effects,\n        factorySpace(effects, after, types.whitespace),\n        nok,\n        types.definitionTitle,\n        types.definitionTitleMarker,\n        types.definitionTitleString\n      )(code)\n    }\n\n    return nok(code)\n  }\n\n  // …\n}\n```\n\n## API\n\nThis module exports the following identifiers: `factoryTitle`.\nThere is no default export.\n\n### `factoryTitle(…)`\n\n###### Parameters\n\n*   `effects` (`Effects`) — Context\n*   `ok` (`State`) — State switched to when successful\n*   `nok` (`State`) — State switched to when not successful\n*   `type` (`string`) — Token type for whole (`\"a\"`, `'b'`, `(c)`)\n*   `markerType` (`string`) — Token type for the markers (`\"`, `'`, `(`, and\n    `)`)\n*   `stringType` (`string`) — Token type for the value (`a`)\n\n###### Returns\n\n`State`.\n\n###### Examples\n\n```markdown\n\"a\"\n'b'\n(c)\n\"a\nb\"\n'a\n    b'\n(a\\)b)\n```\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-title.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-factory-title\n\n[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-title.svg\n\n[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-title\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","_attachments":{},"homepage":"https://github.com/micromark/micromark/tree/main#readme","bugs":{"url":"https://github.com/micromark/micromark/issues"},"license":"MIT"}