@xylabs/url 5.1.1 → 5.1.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.
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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 +1,7 @@
|
|
|
1
|
-
{
|
|
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
|
+
}
|
package/dist/node/index-node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index-node.ts
|
|
2
|
-
import { URL } from "url";
|
|
2
|
+
import { URL } from "node:url";
|
|
3
3
|
|
|
4
4
|
// src/lib/isLocalhost.ts
|
|
5
5
|
var isLocalhost = (hostname) => {
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
NodeUrl as URL,
|
|
13
13
|
isLocalhost
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=index-node.mjs.map
|
|
15
|
+
//# sourceMappingURL=index-node.mjs.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index-node.ts", "../../src/lib/isLocalhost.ts"],
|
|
4
|
+
"sourcesContent": ["import { 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": ";AAAA,SAAS,WAAW;;;ACKb,IAAM,cAAc,CAAC,aAA8B;AACxD,SACE,aAAa,eACV,aAAa,eACb,aAAa,SACb,SAAS,SAAS,YAAY;AAErC;;;ADTA,IAAM,UAAU;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/url",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"url",
|
|
@@ -51,12 +51,13 @@
|
|
|
51
51
|
"README.md"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@xylabs/
|
|
54
|
+
"@types/node": "^25.8.0",
|
|
55
|
+
"@xylabs/toolchain": "~8.0.4",
|
|
56
|
+
"@xylabs/tsconfig": "~8.0.4",
|
|
56
57
|
"eslint": "^10.3.0",
|
|
57
|
-
"typescript": "^
|
|
58
|
-
"vite": "^8.0.
|
|
59
|
-
"vitest": "^4.1.
|
|
58
|
+
"typescript": "^6.0.3",
|
|
59
|
+
"vite": "^8.0.13",
|
|
60
|
+
"vitest": "^4.1.6"
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
63
|
"node": ">=18"
|