{"_id":"micromark-factory-destination","_rev":"267367","name":"micromark-factory-destination","description":"micromark factory to parse destinations (found in resources, definitions)","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:35.000Z","created":"2021-06-07T09:25:50.747Z","1.0.0":"2021-06-22T19:03:31.449Z","1.0.0-beta.1":"2021-06-20T12:12:47.342Z","1.0.0-alpha.3":"2021-06-16T17:17:55.484Z","1.0.0-alpha.2":"2021-06-07T13:35:31.671Z","1.0.0-alpha.1":"2021-06-07T09:25:50.747Z"},"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-destination","version":"1.0.0","description":"micromark factory to parse destinations (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","destination"],"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-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-destination@1.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"fef1cb59ad4997c496f887b6977aa3034a5a277e","size":3120,"noattachment":false,"key":"/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-destination/download/micromark-factory-destination-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-destination_1.0.0_1624388611347_0.08208632962408324"},"_hasShrinkwrap":false,"publish_time":1624388611449,"_cnpm_publish_time":1624388611449,"_cnpmcore_publish_time":"2021-12-14T05:43:43.368Z"},"1.0.0-beta.1":{"name":"micromark-factory-destination","version":"1.0.0-beta.1","description":"micromark factory to parse destinations (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","destination"],"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-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-destination@1.0.0-beta.1","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"1d9683d4b5522f754e355bc220de4f463986c4e7","size":3123,"noattachment":false,"key":"/micromark-factory-destination/-/micromark-factory-destination-1.0.0-beta.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-destination/download/micromark-factory-destination-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-destination_1.0.0-beta.1_1624191167152_0.3023449944972805"},"_hasShrinkwrap":false,"publish_time":1624191167342,"_cnpm_publish_time":1624191167342,"_cnpmcore_publish_time":"2021-12-14T05:43:43.580Z"},"1.0.0-alpha.3":{"name":"micromark-factory-destination","version":"1.0.0-alpha.3","description":"micromark factory to parse destinations (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","destination"],"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-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-destination@1.0.0-alpha.3","_nodeVersion":"16.2.0","_npmVersion":"7.16.0","dist":{"shasum":"167508a2b7eba0214c0a2c15481978b46f5c79f0","size":3127,"noattachment":false,"key":"/micromark-factory-destination/-/micromark-factory-destination-1.0.0-alpha.3.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-destination/download/micromark-factory-destination-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-destination_1.0.0-alpha.3_1623863875349_0.7117326420849828"},"_hasShrinkwrap":false,"publish_time":1623863875484,"_cnpm_publish_time":1623863875484,"_cnpmcore_publish_time":"2021-12-14T05:43:43.947Z"},"1.0.0-alpha.2":{"name":"micromark-factory-destination","version":"1.0.0-alpha.2","description":"micromark factory to parse destinations (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","destination"],"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-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-destination@1.0.0-alpha.2","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"0bac6f977f33525f33a0dc8110a268d8e7c3b657","size":3127,"noattachment":false,"key":"/micromark-factory-destination/-/micromark-factory-destination-1.0.0-alpha.2.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-destination/download/micromark-factory-destination-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-destination_1.0.0-alpha.2_1623072931568_0.8228898074102671"},"_hasShrinkwrap":false,"publish_time":1623072931671,"_cnpm_publish_time":1623072931671,"_cnpmcore_publish_time":"2021-12-14T05:43:44.169Z"},"1.0.0-alpha.1":{"name":"micromark-factory-destination","version":"1.0.0-alpha.1","description":"micromark factory to parse destinations (found in resources, definitions)","license":"MIT","keywords":["micromark","factory","destination"],"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-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-destination@1.0.0-alpha.1","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"f4a7a4d96c7bf7725ca6dd161ce787e044ab328e","size":3120,"noattachment":false,"key":"/micromark-factory-destination/-/micromark-factory-destination-1.0.0-alpha.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-factory-destination/download/micromark-factory-destination-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-destination_1.0.0-alpha.1_1623057950594_0.5314700683022324"},"_hasShrinkwrap":false,"publish_time":1623057950747,"_cnpm_publish_time":1623057950747,"_cnpmcore_publish_time":"2021-12-14T05:43:44.368Z"}},"readme":"# micromark-factory-destination\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 destinations (found in resources, definitions).\n\n## Contents\n\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`factoryDestination(…)`](#factorydestination)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install micromark-factory-destination\n```\n\n## Use\n\n```js\nimport {factoryDestination} from 'micromark-factory-destination'\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 tokenizeResource(effects, ok, nok) {\n  return start\n\n  // …\n\n  /** @type {State} */\n  function open(code) {\n    if (code === codes.rightParenthesis) {\n      return end(code)\n    }\n\n    return factoryDestination(\n      effects,\n      destinationAfter,\n      nok,\n      types.resourceDestination,\n      types.resourceDestinationLiteral,\n      types.resourceDestinationLiteralMarker,\n      types.resourceDestinationRaw,\n      types.resourceDestinationString,\n      constants.linkResourceDestinationBalanceMax\n    )(code)\n  }\n\n  // …\n}\n```\n\n## API\n\nThis module exports the following identifiers: `factoryDestination`.\nThere is no default export.\n\n### `factoryDestination(…)`\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>` or `b`)\n*   `literalType` (`string`) — Token type when enclosed (`<a>`)\n*   `literalMarkerType` (`string`) — Token type for enclosing (`<` and `>`)\n*   `rawType` (`string`) — Token type when not enclosed (`b`)\n*   `stringType` (`string`) — Token type for the URI (`a` or `b`)\n*   `max` (`number`, default: `Infinity`) — Max depth of nested parens\n\n###### Returns\n\n`State`.\n\n###### Examples\n\n```markdown\n<a>\n<a\\>b>\n<a b>\n<a)>\na\na\\)b\na(b)c\na(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-destination.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-factory-destination\n\n[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-destination.svg\n\n[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-destination\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"}