@tinyhttp/encode-url
Advanced tools
Comparing version 2.0.7 to 2.0.8
export declare const encodeUrl: (url: string) => string; | ||
//# sourceMappingURL=index.d.ts.map |
const ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g; | ||
const UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g; | ||
const UNMATCHED_SURROGATE_PAIR_REPLACE = "$1\uFFFD$2"; | ||
const UNMATCHED_SURROGATE_PAIR_REPLACE = "$1�$2"; | ||
const encodeUrl = (url) => { | ||
@@ -5,0 +5,0 @@ return String(url).replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE).replace(ENCODE_CHARS_REGEXP, encodeURI); |
{ | ||
"name": "@tinyhttp/encode-url", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "encode-url rewrite in TypeScript", | ||
@@ -30,5 +30,4 @@ "type": "module", | ||
"dev": "vite", | ||
"build": "vite build", | ||
"postbuild": "tsc --emitDeclarationOnly" | ||
"build": "vite build" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21315
8