bare-url 2.1.0 → 2.1.2
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/global.d.ts +7 -0
- package/index.d.ts +35 -0
- package/index.js +1 -1
- package/package.json +11 -3
- package/prebuilds/android-arm/bare-url.bare +0 -0
- package/prebuilds/android-arm64/bare-url.bare +0 -0
- package/prebuilds/android-ia32/bare-url.bare +0 -0
- package/prebuilds/android-x64/bare-url.bare +0 -0
- package/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/prebuilds/linux-x64/bare-url.bare +0 -0
- package/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/prebuilds/win32-x64/bare-url.bare +0 -0
package/global.d.ts
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface URL {
|
|
2
|
+
href: string
|
|
3
|
+
protocol: string
|
|
4
|
+
username: string
|
|
5
|
+
password: string
|
|
6
|
+
host: string
|
|
7
|
+
hostname: string
|
|
8
|
+
port: string
|
|
9
|
+
pathname: string
|
|
10
|
+
search: string
|
|
11
|
+
hash: string
|
|
12
|
+
|
|
13
|
+
toString(): string
|
|
14
|
+
toJSON(): string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class URL {
|
|
18
|
+
constructor(input: string, base?: string | URL)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare namespace URL {
|
|
22
|
+
export function isURL(value: unknown): value is URL
|
|
23
|
+
|
|
24
|
+
export function parse(input: string, base?: string | URL): URL | null
|
|
25
|
+
|
|
26
|
+
export function canParse(input: string, base?: string | URL): boolean
|
|
27
|
+
|
|
28
|
+
export function fileURLToPath(url: URL | string): string
|
|
29
|
+
|
|
30
|
+
export function pathToFileURL(pathname: string): URL
|
|
31
|
+
|
|
32
|
+
export { URL }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export = URL
|
package/index.js
CHANGED
|
@@ -353,7 +353,7 @@ exports.pathToFileURL = function pathToFileURL(pathname) {
|
|
|
353
353
|
|
|
354
354
|
if (pathname[pathname.length - 1] === '/') {
|
|
355
355
|
resolved += '/'
|
|
356
|
-
} else if (isWindows && pathname[pathname.length - 1 === '\\'
|
|
356
|
+
} else if (isWindows && pathname[pathname.length - 1] === '\\') {
|
|
357
357
|
resolved += '\\'
|
|
358
358
|
}
|
|
359
359
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-url",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "WHATWG URL implementation for JavaScript",
|
|
5
5
|
"exports": {
|
|
6
|
-
".":
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"default": "./index.js"
|
|
9
|
+
},
|
|
7
10
|
"./package": "./package.json",
|
|
8
|
-
"./global":
|
|
11
|
+
"./global": {
|
|
12
|
+
"types": "./global.d.ts",
|
|
13
|
+
"default": "./global.js"
|
|
14
|
+
}
|
|
9
15
|
},
|
|
10
16
|
"files": [
|
|
11
17
|
"index.js",
|
|
18
|
+
"index.d.ts",
|
|
12
19
|
"global.js",
|
|
20
|
+
"global.d.ts",
|
|
13
21
|
"binding.c",
|
|
14
22
|
"binding.js",
|
|
15
23
|
"CMakeLists.txt",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|