strict-uri-encode
Advanced tools
Comparing version 1.0.1 to 1.0.2
'use strict'; | ||
module.exports = function (str) { | ||
if (typeof str !== 'string' && typeof str !== 'number') { | ||
throw new TypeError('Expected a string or a number'); | ||
} | ||
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { | ||
@@ -8,0 +4,0 @@ return '%' + c.charCodeAt(0).toString(16); |
{ | ||
"name": "strict-uri-encode", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A stricter URI encode adhering to RFC 3986", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2514
6