fix
This commit is contained in:
21
node_modules/@tinyhttp/encode-url/LICENSE
generated
vendored
Normal file
21
node_modules/@tinyhttp/encode-url/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 v 1 r t l
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
15
node_modules/@tinyhttp/encode-url/README.md
generated
vendored
Normal file
15
node_modules/@tinyhttp/encode-url/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# @tinyhttp/encode-url
|
||||
|
||||
> [`encode-url`](https://github.com/pillarjs/encodeurl) rewrite in TypeScript.
|
||||
|
||||
Encode a URL to a percent-encoded form, excluding already-encoded sequences
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
pnpm i @tinyhttp/encode-url
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
## Example
|
||||
2
node_modules/@tinyhttp/encode-url/dist/index.d.ts
generated
vendored
Normal file
2
node_modules/@tinyhttp/encode-url/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const encodeUrl: (url: string) => string;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@tinyhttp/encode-url/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@tinyhttp/encode-url/dist/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,MAIvC,CAAA"}
|
||||
10
node_modules/@tinyhttp/encode-url/dist/index.js
generated
vendored
Normal file
10
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
|
||||
1
node_modules/@tinyhttp/encode-url/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@tinyhttp/encode-url/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["const ENCODE_CHARS_REGEXP =\n /(?:[^\\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\n\nconst UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\\uD800-\\uDBFF])[\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF]([^\\uDC00-\\uDFFF]|$)/g\n\nconst UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\\uFFFD$2'\n\nexport const encodeUrl = (url: string): string => {\n return String(url)\n .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)\n .replace(ENCODE_CHARS_REGEXP, encodeURI)\n}\n"],"names":[],"mappings":"AAAA,MAAM,sBACJ;AAEF,MAAM,kCAAkC;AAExC,MAAM,mCAAmC;AAE5B,MAAA,YAAY,CAAC,QAAwB;AACzC,SAAA,OAAO,GAAG,EACd,QAAQ,iCAAiC,gCAAgC,EACzE,QAAQ,qBAAqB,SAAS;AAC3C;"}
|
||||
34
node_modules/@tinyhttp/encode-url/package.json
generated
vendored
Normal file
34
node_modules/@tinyhttp/encode-url/package.json
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@tinyhttp/encode-url",
|
||||
"version": "2.1.1",
|
||||
"description": "encode-url rewrite in TypeScript",
|
||||
"type": "module",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": "./dist/index.js",
|
||||
"homepage": "https://tinyhttp.v1rtl.site",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tinyhttp/tinyhttp.git",
|
||||
"directory": "packages/cors"
|
||||
},
|
||||
"keywords": [
|
||||
"tinyhttp",
|
||||
"node.js",
|
||||
"web framework",
|
||||
"web",
|
||||
"backend",
|
||||
"cors"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
},
|
||||
"author": "v1rtl",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user