@xylabs/url 7.0.2 → 7.0.3
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/README.md +6 -4
- package/dist/neutral/index.d.ts +2 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +3 -0
- package/dist/neutral/index.mjs.map +7 -0
- package/package.json +21 -21
- package/dist/browser/index-browser.d.ts +0 -12
- package/dist/browser/index-browser.d.ts.map +0 -1
- package/dist/browser/index-browser.mjs +0 -12
- package/dist/browser/index-browser.mjs.map +0 -7
- package/dist/browser/index-neutral.d.ts +0 -12
- package/dist/browser/index-neutral.d.ts.map +0 -1
- package/dist/browser/index-node.d.ts +0 -13
- package/dist/browser/index-node.d.ts.map +0 -1
- package/dist/browser/lib/index.d.ts +0 -2
- package/dist/browser/lib/index.d.ts.map +0 -1
- package/dist/browser/lib/isLocalhost.d.ts +0 -7
- package/dist/browser/lib/isLocalhost.d.ts.map +0 -1
- package/dist/neutral/index-browser.d.ts +0 -12
- package/dist/neutral/index-browser.d.ts.map +0 -1
- package/dist/neutral/index-neutral.d.ts +0 -12
- package/dist/neutral/index-neutral.d.ts.map +0 -1
- package/dist/neutral/index-neutral.mjs +0 -12
- package/dist/neutral/index-neutral.mjs.map +0 -7
- package/dist/neutral/index-node.d.ts +0 -13
- package/dist/neutral/index-node.d.ts.map +0 -1
- package/dist/neutral/lib/index.d.ts +0 -2
- package/dist/neutral/lib/index.d.ts.map +0 -1
- package/dist/neutral/lib/isLocalhost.d.ts +0 -7
- package/dist/neutral/lib/isLocalhost.d.ts.map +0 -1
- package/dist/node/index-browser.d.ts +0 -12
- package/dist/node/index-browser.d.ts.map +0 -1
- package/dist/node/index-neutral.d.ts +0 -12
- package/dist/node/index-neutral.d.ts.map +0 -1
- package/dist/node/index-node.d.ts +0 -13
- package/dist/node/index-node.d.ts.map +0 -1
- package/dist/node/index-node.mjs +0 -15
- package/dist/node/index-node.mjs.map +0 -7
- package/dist/node/lib/index.d.ts +0 -2
- package/dist/node/lib/index.d.ts.map +0 -1
- package/dist/node/lib/isLocalhost.d.ts +0 -7
- package/dist/node/lib/isLocalhost.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
> **Deprecated.** Use [`@ariestools/sdk`](../../ariestools-sdk/README.md) instead. This package is a backward-compatibility re-export shim.
|
|
2
|
+
|
|
1
3
|
[![logo][]](https://xylabs.com)
|
|
2
4
|
|
|
3
5
|
# @xylabs/url
|
|
@@ -12,25 +14,25 @@
|
|
|
12
14
|
Using npm:
|
|
13
15
|
|
|
14
16
|
```sh
|
|
15
|
-
npm install
|
|
17
|
+
npm install @xylabs/url
|
|
16
18
|
```
|
|
17
19
|
|
|
18
20
|
Using yarn:
|
|
19
21
|
|
|
20
22
|
```sh
|
|
21
|
-
yarn add
|
|
23
|
+
yarn add @xylabs/url
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
Using pnpm:
|
|
25
27
|
|
|
26
28
|
```sh
|
|
27
|
-
pnpm add
|
|
29
|
+
pnpm add @xylabs/url
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
Using bun:
|
|
31
33
|
|
|
32
34
|
```sh
|
|
33
|
-
bun add
|
|
35
|
+
bun add @xylabs/url
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/url",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.3",
|
|
4
|
+
"description": "DEPRECATED — use @ariestools/sdk/url. Backward-compatibility re-export shim.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"url",
|
|
7
6
|
"xylabs",
|
|
8
7
|
"utility",
|
|
9
8
|
"typescript",
|
|
@@ -28,18 +27,8 @@
|
|
|
28
27
|
"type": "module",
|
|
29
28
|
"exports": {
|
|
30
29
|
".": {
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"default": "./dist/browser/index-browser.mjs"
|
|
34
|
-
},
|
|
35
|
-
"node": {
|
|
36
|
-
"types": "./dist/node/index-node.d.ts",
|
|
37
|
-
"default": "./dist/node/index-node.mjs"
|
|
38
|
-
},
|
|
39
|
-
"default": {
|
|
40
|
-
"types": "./dist/neutral/index-neutral.d.ts",
|
|
41
|
-
"default": "./dist/neutral/index-neutral.mjs"
|
|
42
|
-
}
|
|
30
|
+
"types": "./dist/neutral/index.d.ts",
|
|
31
|
+
"default": "./dist/neutral/index.mjs"
|
|
43
32
|
},
|
|
44
33
|
"./package.json": "./package.json"
|
|
45
34
|
},
|
|
@@ -50,21 +39,32 @@
|
|
|
50
39
|
"!**/*.test.*",
|
|
51
40
|
"README.md"
|
|
52
41
|
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@ariestools/sdk": "~7.0.3"
|
|
44
|
+
},
|
|
53
45
|
"devDependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@xylabs/
|
|
46
|
+
"@opentelemetry/api": "^1.9.1",
|
|
47
|
+
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
48
|
+
"@xylabs/toolchain": "^8.5.5",
|
|
49
|
+
"@xylabs/tsconfig": "^8.5.5",
|
|
50
|
+
"async-mutex": "^0.5.0",
|
|
57
51
|
"browserslist": "4.28.4",
|
|
58
52
|
"eslint": "^10.6.0",
|
|
59
53
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
60
54
|
"typescript": "^6.0.3",
|
|
61
|
-
"
|
|
62
|
-
|
|
55
|
+
"zod": "^4.4.3"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@opentelemetry/api": "^1.9",
|
|
59
|
+
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
60
|
+
"async-mutex": "^0.5",
|
|
61
|
+
"zod": "^4.4"
|
|
63
62
|
},
|
|
64
63
|
"engines": {
|
|
65
64
|
"node": ">=18"
|
|
66
65
|
},
|
|
67
66
|
"publishConfig": {
|
|
68
67
|
"access": "public"
|
|
69
|
-
}
|
|
68
|
+
},
|
|
69
|
+
"deprecated": "Use @ariestools/sdk/url instead. @xylabs/url is a compatibility shim only and will not receive further updates."
|
|
70
70
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Browser-specific URL class, aliased from the global `URL`. */
|
|
2
|
-
declare const BrowserUrl: {
|
|
3
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
-
prototype: URL;
|
|
5
|
-
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
-
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
-
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
-
revokeObjectURL(url: string): void;
|
|
9
|
-
};
|
|
10
|
-
export { BrowserUrl as URL };
|
|
11
|
-
export * from './lib/index.ts';
|
|
12
|
-
//# sourceMappingURL=index-browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,QAAA,MAAM,UAAU;;;;;;;CAAM,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/lib/isLocalhost.ts
|
|
2
|
-
var isLocalhost = (hostname) => {
|
|
3
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
// src/index-browser.ts
|
|
7
|
-
var BrowserUrl = URL;
|
|
8
|
-
export {
|
|
9
|
-
BrowserUrl as URL,
|
|
10
|
-
isLocalhost
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=index-browser.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/lib/isLocalhost.ts", "../../src/index-browser.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).\n * @param hostname - The hostname to check\n * @returns `true` if the hostname is a localhost address\n */\nexport const isLocalhost = (hostname: string): boolean => {\n return (\n hostname === 'localhost'\n || hostname === '127.0.0.1'\n || hostname === '::1' // IPv6 localhost\n || hostname.endsWith('.localhost')\n )\n}\n", "/// <reference lib=\"dom\" />\n/** Browser-specific URL class, aliased from the global `URL`. */\nconst BrowserUrl = URL\nexport { BrowserUrl as URL }\nexport * from './lib/index.ts'\n"],
|
|
5
|
-
"mappings": ";AAKO,IAAM,cAAc,CAAC,aAA8B;AACxD,SACE,aAAa,eACV,aAAa,eACb,aAAa,SACb,SAAS,SAAS,YAAY;AAErC;;;ACVA,IAAM,aAAa;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Platform-neutral URL class, aliased from the global `URL`. */
|
|
2
|
-
declare const NeutralUrl: {
|
|
3
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
-
prototype: URL;
|
|
5
|
-
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
-
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
-
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
-
revokeObjectURL(url: string): void;
|
|
9
|
-
};
|
|
10
|
-
export { NeutralUrl as URL };
|
|
11
|
-
export * from './lib/index.ts';
|
|
12
|
-
//# sourceMappingURL=index-neutral.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-neutral.d.ts","sourceRoot":"","sources":["../../src/index-neutral.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,QAAA,MAAM,UAAU;;;;;;;CAAM,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { URL } from 'node:url';
|
|
2
|
-
/** Node.js-specific URL class, imported from the `node:url` module. */
|
|
3
|
-
declare const NodeUrl: {
|
|
4
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
5
|
-
prototype: URL;
|
|
6
|
-
canParse(input: string | URL, base?: string | URL): boolean;
|
|
7
|
-
createObjectURL(blob: import("node:buffer").Blob): string;
|
|
8
|
-
parse(input: string | URL, base?: string | URL): URL | null;
|
|
9
|
-
revokeObjectURL(id: string): void;
|
|
10
|
-
};
|
|
11
|
-
export { NodeUrl as URL };
|
|
12
|
-
export * from './lib/index.ts';
|
|
13
|
-
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,uEAAuE;AACvE,QAAA,MAAM,OAAO;;;;;;;CAAM,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA;AACzB,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
|
|
3
|
-
* @param hostname - The hostname to check
|
|
4
|
-
* @returns `true` if the hostname is a localhost address
|
|
5
|
-
*/
|
|
6
|
-
export declare const isLocalhost: (hostname: string) => boolean;
|
|
7
|
-
//# sourceMappingURL=isLocalhost.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isLocalhost.d.ts","sourceRoot":"","sources":["../../../src/lib/isLocalhost.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,OAO9C,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Browser-specific URL class, aliased from the global `URL`. */
|
|
2
|
-
declare const BrowserUrl: {
|
|
3
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
-
prototype: URL;
|
|
5
|
-
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
-
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
-
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
-
revokeObjectURL(url: string): void;
|
|
9
|
-
};
|
|
10
|
-
export { BrowserUrl as URL };
|
|
11
|
-
export * from './lib/index.ts';
|
|
12
|
-
//# sourceMappingURL=index-browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,QAAA,MAAM,UAAU;;;;;;;CAAM,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Platform-neutral URL class, aliased from the global `URL`. */
|
|
2
|
-
declare const NeutralUrl: {
|
|
3
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
-
prototype: URL;
|
|
5
|
-
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
-
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
-
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
-
revokeObjectURL(url: string): void;
|
|
9
|
-
};
|
|
10
|
-
export { NeutralUrl as URL };
|
|
11
|
-
export * from './lib/index.ts';
|
|
12
|
-
//# sourceMappingURL=index-neutral.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-neutral.d.ts","sourceRoot":"","sources":["../../src/index-neutral.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,QAAA,MAAM,UAAU;;;;;;;CAAM,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/lib/isLocalhost.ts
|
|
2
|
-
var isLocalhost = (hostname) => {
|
|
3
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
// src/index-neutral.ts
|
|
7
|
-
var NeutralUrl = URL;
|
|
8
|
-
export {
|
|
9
|
-
NeutralUrl as URL,
|
|
10
|
-
isLocalhost
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=index-neutral.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/lib/isLocalhost.ts", "../../src/index-neutral.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).\n * @param hostname - The hostname to check\n * @returns `true` if the hostname is a localhost address\n */\nexport const isLocalhost = (hostname: string): boolean => {\n return (\n hostname === 'localhost'\n || hostname === '127.0.0.1'\n || hostname === '::1' // IPv6 localhost\n || hostname.endsWith('.localhost')\n )\n}\n", "/// <reference lib=\"dom\" />\n/** Platform-neutral URL class, aliased from the global `URL`. */\nconst NeutralUrl = URL\nexport { NeutralUrl as URL }\nexport * from './lib/index.ts'\n"],
|
|
5
|
-
"mappings": ";AAKO,IAAM,cAAc,CAAC,aAA8B;AACxD,SACE,aAAa,eACV,aAAa,eACb,aAAa,SACb,SAAS,SAAS,YAAY;AAErC;;;ACVA,IAAM,aAAa;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { URL } from 'node:url';
|
|
2
|
-
/** Node.js-specific URL class, imported from the `node:url` module. */
|
|
3
|
-
declare const NodeUrl: {
|
|
4
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
5
|
-
prototype: URL;
|
|
6
|
-
canParse(input: string | URL, base?: string | URL): boolean;
|
|
7
|
-
createObjectURL(blob: import("node:buffer").Blob): string;
|
|
8
|
-
parse(input: string | URL, base?: string | URL): URL | null;
|
|
9
|
-
revokeObjectURL(id: string): void;
|
|
10
|
-
};
|
|
11
|
-
export { NodeUrl as URL };
|
|
12
|
-
export * from './lib/index.ts';
|
|
13
|
-
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,uEAAuE;AACvE,QAAA,MAAM,OAAO;;;;;;;CAAM,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA;AACzB,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
|
|
3
|
-
* @param hostname - The hostname to check
|
|
4
|
-
* @returns `true` if the hostname is a localhost address
|
|
5
|
-
*/
|
|
6
|
-
export declare const isLocalhost: (hostname: string) => boolean;
|
|
7
|
-
//# sourceMappingURL=isLocalhost.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isLocalhost.d.ts","sourceRoot":"","sources":["../../../src/lib/isLocalhost.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,OAO9C,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Browser-specific URL class, aliased from the global `URL`. */
|
|
2
|
-
declare const BrowserUrl: {
|
|
3
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
-
prototype: URL;
|
|
5
|
-
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
-
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
-
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
-
revokeObjectURL(url: string): void;
|
|
9
|
-
};
|
|
10
|
-
export { BrowserUrl as URL };
|
|
11
|
-
export * from './lib/index.ts';
|
|
12
|
-
//# sourceMappingURL=index-browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,QAAA,MAAM,UAAU;;;;;;;CAAM,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Platform-neutral URL class, aliased from the global `URL`. */
|
|
2
|
-
declare const NeutralUrl: {
|
|
3
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
-
prototype: URL;
|
|
5
|
-
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
-
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
-
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
-
revokeObjectURL(url: string): void;
|
|
9
|
-
};
|
|
10
|
-
export { NeutralUrl as URL };
|
|
11
|
-
export * from './lib/index.ts';
|
|
12
|
-
//# sourceMappingURL=index-neutral.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-neutral.d.ts","sourceRoot":"","sources":["../../src/index-neutral.ts"],"names":[],"mappings":"AACA,iEAAiE;AACjE,QAAA,MAAM,UAAU;;;;;;;CAAM,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { URL } from 'node:url';
|
|
2
|
-
/** Node.js-specific URL class, imported from the `node:url` module. */
|
|
3
|
-
declare const NodeUrl: {
|
|
4
|
-
new (url: string | URL, base?: string | URL): URL;
|
|
5
|
-
prototype: URL;
|
|
6
|
-
canParse(input: string | URL, base?: string | URL): boolean;
|
|
7
|
-
createObjectURL(blob: import("node:buffer").Blob): string;
|
|
8
|
-
parse(input: string | URL, base?: string | URL): URL | null;
|
|
9
|
-
revokeObjectURL(id: string): void;
|
|
10
|
-
};
|
|
11
|
-
export { NodeUrl as URL };
|
|
12
|
-
export * from './lib/index.ts';
|
|
13
|
-
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,uEAAuE;AACvE,QAAA,MAAM,OAAO;;;;;;;CAAM,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA;AACzB,cAAc,gBAAgB,CAAA"}
|
package/dist/node/index-node.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// src/index-node.ts
|
|
2
|
-
import { URL } from "node:url";
|
|
3
|
-
|
|
4
|
-
// src/lib/isLocalhost.ts
|
|
5
|
-
var isLocalhost = (hostname) => {
|
|
6
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
// src/index-node.ts
|
|
10
|
-
var NodeUrl = URL;
|
|
11
|
-
export {
|
|
12
|
-
NodeUrl as URL,
|
|
13
|
-
isLocalhost
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=index-node.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index-node.ts", "../../src/lib/isLocalhost.ts"],
|
|
4
|
-
"sourcesContent": ["/// <reference types=\"node\" />\n\nimport { URL } from 'node:url'\n\n/** Node.js-specific URL class, imported from the `node:url` module. */\nconst NodeUrl = URL\nexport { NodeUrl as URL }\nexport * from './lib/index.ts'\n", "/**\n * Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).\n * @param hostname - The hostname to check\n * @returns `true` if the hostname is a localhost address\n */\nexport const isLocalhost = (hostname: string): boolean => {\n return (\n hostname === 'localhost'\n || hostname === '127.0.0.1'\n || hostname === '::1' // IPv6 localhost\n || hostname.endsWith('.localhost')\n )\n}\n"],
|
|
5
|
-
"mappings": ";AAEA,SAAS,WAAW;;;ACGb,IAAM,cAAc,CAAC,aAA8B;AACxD,SACE,aAAa,eACV,aAAa,eACb,aAAa,SACb,SAAS,SAAS,YAAY;AAErC;;;ADPA,IAAM,UAAU;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/node/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
|
|
3
|
-
* @param hostname - The hostname to check
|
|
4
|
-
* @returns `true` if the hostname is a localhost address
|
|
5
|
-
*/
|
|
6
|
-
export declare const isLocalhost: (hostname: string) => boolean;
|
|
7
|
-
//# sourceMappingURL=isLocalhost.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isLocalhost.d.ts","sourceRoot":"","sources":["../../../src/lib/isLocalhost.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,OAO9C,CAAA"}
|