{"name":"decode-uri-component","version":"0.5.0","description":"A better decodeURIComponent","license":"MIT","repository":{"type":"git","url":"git+https://github.com/SamVerschueren/decode-uri-component.git"},"sideEffects":false,"author":{"name":"Sam Verschueren","email":"sam.verschueren@gmail.com","url":"github.com/SamVerschueren"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=14.16"},"scripts":{"test":"xo && nyc ava && tsd","coveralls":"nyc report --reporter=text-lcov | coveralls"},"keywords":["decode","uri","component","decodeuricomponent","components","decoder","url"],"devDependencies":{"ava":"^5.1.0","coveralls":"^3.1.1","nyc":"^15.1.0","tsd":"^0.25.0","xo":"^0.53.1"},"overrides":{"eslint":"8.39.0"},"tsd":{"compilerOptions":{"module":"node16"}},"_id":"decode-uri-component@0.5.0","gitHead":"a12fabaa28303cc8b5b07e93d128f4fc09fc31e5","types":"./index.d.ts","bugs":{"url":"https://github.com/SamVerschueren/decode-uri-component/issues"},"homepage":"https://github.com/SamVerschueren/decode-uri-component#readme","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-1BiQVoK8C9gUbQU6NzAtO/tkz2qOFpEObMWpcFvhx4fYnj4Oc5yzaJN/LD36ihkVUdXyh5ZekzX+yM+ty/SrPg==","shasum":"4592fa1e1d640ec5e2760e2e168ad2ab5f2c9da1","tarball":"http://registry-npm.ywwl.com/decode-uri-component/download/decode-uri-component-0.5.0.tgz","fileCount":5,"unpackedSize":8556,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDtFtzR1Kl5pGUz07xfGDBEP1qLO9WtplHX52NB77SA+gIhAMHSp31keq5A57Lhm9axZ4GRNt/WmWzoH7mAq/5u5y64"}],"size":3781,"noattachment":false,"key":"/decode-uri-component/-/decode-uri-component-0.5.0.tgz"},"_npmUser":{"name":"samverschueren","email":"sam.verschueren@gmail.com"},"directories":{},"maintainers":[{"name":"samverschueren","email":"sam.verschueren@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/decode-uri-component_0.5.0_1782748820476_0.09441900994972374"},"_hasShrinkwrap":false,"readme":"# decode-uri-component\n\n![CI](https://github.com/SamVerschueren/decode-uri-component/workflows/CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/SamVerschueren/decode-uri-component/badge.svg?branch=master&service=github)](https://coveralls.io/github/SamVerschueren/decode-uri-component?branch=master)\n\n> A better [decodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)\n\n\n## Why?\n\n- Converts the [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) to a [replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) `�`.\n- Does not throw with invalid encoded input.\n- Decodes as much of the string as possible.\n\n\n## Install\n\n```\n$ npm install --save decode-uri-component\n```\n\n\n## Usage\n\n```js\nimport decodeUriComponent from 'decode-uri-component';\n\ndecodeUriComponent('%25');\n//=> '%'\n\ndecodeUriComponent('%');\n//=> '%'\n\ndecodeUriComponent('st%C3%A5le');\n//=> 'ståle'\n\ndecodeUriComponent('%st%C3%A5le%');\n//=> '%ståle%'\n\ndecodeUriComponent('%%7Bst%C3%A5le%7D%');\n//=> '%{ståle}%'\n\ndecodeUriComponent('%7B%ab%%7C%de%%7D');\n//=> '{%ab%|%de%}'\n\ndecodeUriComponent('%FE%FF');\n//=> '\\uFFFD\\uFFFD'\n\ndecodeUriComponent('%C2');\n//=> '\\uFFFD'\n\ndecodeUriComponent('%C2%B5');\n//=> 'µ'\n```\n\n\n## API\n\n### decodeUriComponent(encodedURI)\n\n#### encodedURI\n\nType: `string`\n\nAn encoded component of a Uniform Resource Identifier.\n\n\n## License\n\nMIT © [Sam Verschueren](https://github.com/SamVerschueren)\n\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-decode-uri-component?utm_source=npm-decode-uri-component&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1782748820602,"_cnpm_publish_time":1782748820602,"dist-tags":{"latest":"0.5.1"}}