@oozcitak/url 1.0.4 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +25 -27
- package/lib/URLAlgorithm.d.ts +3 -3
- package/lib/URLAlgorithm.js +287 -460
- package/lib/URLAlgorithm.js.map +1 -1
- package/lib/URLImpl.js +285 -331
- package/lib/URLImpl.js.map +1 -1
- package/lib/URLSearchParamsImpl.d.ts +1 -1
- package/lib/URLSearchParamsImpl.js +71 -190
- package/lib/URLSearchParamsImpl.js.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +2 -2
- package/lib/interfaces.js +2 -1
- package/lib/interfaces.js.map +1 -1
- package/package.json +42 -55
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Ozgur Ozcitak
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Ozgur Ozcitak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
# URL
|
|
2
|
-
A Javascript implementation of the [URL Living Standard](https://url.spec.whatwg.org/).
|
|
3
|
-
|
|
4
|
-
[](http://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://www.npmjs.com/package/@oozcitak/url)
|
|
6
|
-
|
|
7
|
-
[.
|
|
3
|
+
|
|
4
|
+
[](http://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.npmjs.com/package/@oozcitak/url)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/oozcitak/url/actions)
|
|
8
|
+
[](https://codecov.io/gh/oozcitak/url)
|
|
9
|
+
|
|
10
|
+
# Version
|
|
11
|
+
Current version implements the standard as of commit [7ae1c69](https://url.spec.whatwg.org/commit-snapshots/7ae1c691c96f0d82fafa24c33aa1e8df9ffbf2bc/).
|
|
12
|
+
|
|
13
|
+
# Installation
|
|
14
|
+
```
|
|
15
|
+
npm install @oozcitak/url
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
# Usage
|
|
19
|
+
Create an instance of the `URL` or `URLSearchParams` classes.
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
const { URL } = require("@oozcitak/url");
|
|
23
|
+
|
|
24
|
+
const url = new URL("https://example.org/file.aspx")
|
|
25
|
+
```
|
package/lib/URLAlgorithm.d.ts
CHANGED
|
@@ -173,7 +173,7 @@ export declare function opaqueHostParser(input: string): string | null;
|
|
|
173
173
|
*
|
|
174
174
|
* @param url - an url
|
|
175
175
|
*/
|
|
176
|
-
export declare function resolveABlobURL(url: URLRecord):
|
|
176
|
+
export declare function resolveABlobURL(url: URLRecord): null;
|
|
177
177
|
/**
|
|
178
178
|
* Percent encodes a byte.
|
|
179
179
|
*
|
|
@@ -185,13 +185,13 @@ export declare function percentEncode(value: number): string;
|
|
|
185
185
|
*
|
|
186
186
|
* @param input - a byte sequence
|
|
187
187
|
*/
|
|
188
|
-
export declare function percentDecode(input: Uint8Array): Uint8Array
|
|
188
|
+
export declare function percentDecode(input: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
189
189
|
/**
|
|
190
190
|
* String percent decodes a string.
|
|
191
191
|
*
|
|
192
192
|
* @param input - a string
|
|
193
193
|
*/
|
|
194
|
-
export declare function stringPercentDecode(input: string): Uint8Array
|
|
194
|
+
export declare function stringPercentDecode(input: string): Uint8Array<ArrayBuffer>;
|
|
195
195
|
/**
|
|
196
196
|
* UTF-8 percent encodes a code point, using a percent encode set.
|
|
197
197
|
*
|