added doga
This commit is contained in:
10
25_02_24/node_modules/@tinyhttp/encode-url/dist/index.js
generated
vendored
Normal file
10
25_02_24/node_modules/@tinyhttp/encode-url/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
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<>$2";
|
||||
const encodeUrl = (url) => {
|
||||
return String(url).replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE).replace(ENCODE_CHARS_REGEXP, encodeURI);
|
||||
};
|
||||
export {
|
||||
encodeUrl
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user