Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

decode-uri-component

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

decode-uri-component

A better decodeURIComponent

    0.2.2latest

Version published
Maintainers
1
Weekly downloads
18,314,424
decreased by-1.24%

Weekly downloads

Changelog

Source

  • Prevent overwriting previously decoded tokens 980e0bf

https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

Readme

Source

decode-uri-component

CI Coverage Status

A better decodeURIComponent

Why?

  • Decodes + to a space.
  • 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

const decodeUriComponent = require('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


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is decode-uri-component?

A better decodeURIComponent

Is decode-uri-component popular?

The npm package decode-uri-component receives a total of 14,505,715 weekly downloads. As such, decode-uri-component popularity was classified as popular.

Is decode-uri-component well maintained?

We found that decode-uri-component demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 01 Dec 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc