Socket
Socket
Sign inDemoInstall

strict-uri-encode

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

strict-uri-encode

A stricter URI encode adhering to RFC 3986


Version published
Maintainers
1
Weekly downloads
10,289,831
decreased by-8.27%

Weekly downloads

Package description

What is strict-uri-encode?

The strict-uri-encode npm package is designed for percent-encoding a string as per RFC 3986. It is particularly useful for encoding URI components more strictly than what is provided by native JavaScript functions like encodeURIComponent. This can be essential in situations where you need to ensure that characters are encoded in a way that is compliant with certain web standards or APIs that expect strictly encoded URIs.

What are strict-uri-encode's main functionalities?

Percent-encoding URI components

This feature allows you to percent-encode a URI component more strictly than encodeURIComponent. For example, characters such as '!', '*', ''', '(', and ')' will be encoded, which are not encoded by the encodeURIComponent function. This is useful when you need to encode these characters in a URI component to ensure it adheres to certain standards or API expectations.

"strict-uri-encode('! * '()')"

Other packages similar to strict-uri-encode

Readme

Source

strict-uri-encode Build Status

A stricter URI encode adhering to RFC 3986

Install

$ npm install --save strict-uri-encode

Usage

const strictUriEncode = require('strict-uri-encode');

strictUriEncode('unicorn!foobar');
//=> 'unicorn%21foobar'

strictUriEncode('unicorn*foobar');
//=> 'unicorn%2Afoobar'

API

strictUriEncode(string)

string

Type: string, number

String to URI encode.

License

MIT © Kevin Mårtensson

Keywords

FAQs

Last updated on 11 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc