0.4.1 • Published 2 years ago

decode-uri-component v0.4.1

Weekly downloads
20,629,420
License
MIT
Repository
github
Last release
2 years ago

decode-uri-component

CI Coverage Status

A better decodeURIComponent

Why?

  • Converts the BOM to a replacement character .
  • Does not throw with invalid encoded input.
  • Decodes as much of the string as possible.

Install

$ npm install --save decode-uri-component

Usage

import decodeUriComponent from 'decode-uri-component';

decodeUriComponent('%25');
//=> '%'

decodeUriComponent('%');
//=> '%'

decodeUriComponent('st%C3%A5le');
//=> 'ståle'

decodeUriComponent('%st%C3%A5le%');
//=> '%ståle%'

decodeUriComponent('%%7Bst%C3%A5le%7D%');
//=> '%{ståle}%'

decodeUriComponent('%7B%ab%%7C%de%%7D');
//=> '{%ab%|%de%}'

decodeUriComponent('%FE%FF');
//=> '\uFFFD\uFFFD'

decodeUriComponent('%C2');
//=> '\uFFFD'

decodeUriComponent('%C2%B5');
//=> 'µ'

API

decodeUriComponent(encodedURI)

encodedURI

Type: string

An encoded component of a Uniform Resource Identifier.

License

MIT © Sam Verschueren


source-map-resolvequery-string@xdn/core@xdn/cliarchetype-librarycomponennentt@layer0/core@layer0/clivuedragdropuploadimagespopsmart-common-authreact-native-bluetooth2killi8n-react-native-fast-imagern-send-smsspecify-importsbabel-specify-imports@icanpm/api-mastergew-nodejs-api-client@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-iconsquery-string-es5-sortquery-string-es5-with-sortreact-native-template-rfbasecloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apideneme323112@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewercthpb-plugin-social@olivervorasai/sliderreact-native-printer-brothersrn-pdf-reader-offlinereact0rreact-native-shekhar-bridge-testasterjscogoportutilsdyx-reacttalent-to-vite-cliwilscanner@oiti/documentoscopy-react-nativejs4cytoscape@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@saaspe/componentsplginexpand-react-bridgeopea-bootstraap@everything-registry/sub-chunk-1458@brockneedscoffee/minecraft-ts-startersondgriffin-ui-library@runcitadel/lndconnecttailwind-vector-effectsyncbackbasestepkitest-carosello-campustest-library-123test-haptik-libteadanteatest-npm-jjmessiwinx-form-winxweb-elements-iconsvue-button-test1webchewoven-challenge-deployxdms3xdn-routerwifi_configuration_packagewwebsuperset-plugin-chart-hello-world2supercluster-googlemaps-adapter-clonesstarlight-obsidiantechfox-icontechfox-react-featherspotify-ds-sesticky-scroll-catchstp-cdktestapateste_cegidtestnpm_lmnsvelte-component-libtextfield-samplevue-compmentvision-camera-plugin-scan-facesvision-camera-base64-resized
0.3.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.2.1

2 years ago

0.2.2

2 years ago

0.2.0

8 years ago

0.1.0

8 years ago