{"name":"micromark-util-encode","version":"1.0.1","description":"micromark utility to encode dangerous html characters","license":"MIT","keywords":["micromark","util","utility","html","encode"],"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":"index.d.ts","exports":"./index.js","scripts":{"build":"rimraf \"*.d.ts\" && tsc && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"9a3a2dd28b996049fe7de46d6e6f905d20bf5caf","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-util-encode@1.0.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==","shasum":"2c1c22d3800870ad770ece5686ebca5920353383","tarball":"http://registry-npm.ywwl.com/micromark-util-encode/download/micromark-util-encode-1.0.1.tgz","fileCount":4,"unpackedSize":5119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhygFGCRA9TVsSAnZWagAAjZ0P/jldvhoUPqfjD7PvypUR\nJFZ7vdIVIEQ7gY7acUyylSchDJdDu/d3Bs79hpgUmJr2WY56K3ciwQb3hUZi\nl8YRIgYWuY6JcBp/CouqOdB3jFvpyTcEVD9m0pSj8tlVBNXAF26T67renNnn\n7mQLp/j3/EiPGU2w14V2PvymaOP5G/oRgg0QSGmV2Wpkd11TmiurukWsPlo1\nzZ8F3UUtpw/8Mw1cg06PxfhORuYBRC70swFNNAjLa74U8nsNVDCjAiYA/Bxb\nfd9LE3c/nXCt9OUMCBvgCOiRPw4Sx1gznLWDGTIChgFrWF7KZEntm+ZSJYS6\ntdOCnGWzb2NZKLjdnAr1yWpCeapPIKk1m5PIp/uZHFalhwAN7eUT/4usY11I\nPavpG6CtOkBws9ij4GC9VHQ+DD7fbbphg9QFfZG0p+BK5vftJLzsIE0u9Vr3\nWBjHSUg9y1vQlYs2Zw0LCXcysmyAV8OVcB3UCs4oYdMCKuTmP2L7KrxK/p9V\nAmJ0Cd3l6SZUZxjIdZCFHV5m67mVu4Ch5vUKcbjPnYDri+DfuialzHDziaP/\n3DUkTLBOYhlYK6qlfEVt4Od0LGQR3OAouvCU25pjaTCu9zUGeDskIcKiP73J\noTCsZ6FwEOJCPhcf2RjWsrTqDxWRTkK/iXgkxOoCPYCyN6d/IreaOwTmTQhE\nTtXf\r\n=XTWr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP61Iifktva1b7Fzj/PZCXWCV4zBffyjyx2z4cUswu5wIgELojkW9eC82wIhE+akmsk2PbQb8WqBlO5EGu+Z0ECTM="}],"size":1919,"noattachment":false,"key":"/micromark-util-encode/-/micromark-util-encode-1.0.1.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-util-encode_1.0.1_1640628550763_0.9695955544046908"},"_hasShrinkwrap":false,"readme":"# micromark-util-encode\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][] utility to encode dangerous html characters.\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    *   [`encode(value)`](#encodevalue)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package exposes an algorithm to make text safe for embedding in HTML.\n\n## When should I use this?\n\nThis package might be 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-util-encode\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {encode} from 'https://esm.sh/micromark-util-encode@1'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {encode} from 'https://esm.sh/micromark-util-encode@1?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {encode} from 'micromark-util-encode'\n\nencode('<3') // '&lt;3'\n```\n\n## API\n\nThis module exports the identifier [`encode`][api-encode].\nThere is no default export.\n\n### `encode(value)`\n\nEncode only the dangerous HTML characters.\n\nThis ensures that certain characters which have special meaning in HTML are\ndealt with.\nTechnically, we can skip `>` and `\"` in many cases, but CM includes them.\n\n###### Parameters\n\n*   `value` (`string`)\n    — value to encode\n\n###### Returns\n\nEncoded value (`string`).\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-util-encode@^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-util-encode.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-util-encode\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-util-encode\n\n[bundle-size]: https://bundlejs.com/?q=micromark-util-encode\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[typescript]: https://www.typescriptlang.org\n\n[micromark]: https://github.com/micromark/micromark\n\n[api-encode]: #encodevalue\n","publish_time":1640628550874,"_cnpm_publish_time":1640628550874,"dist-tags":{"latest":"2.0.1","next":"1.0.0-beta.1"}}