quasiurl 1.1.6 → 1.1.8
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 +7 -5
- package/dist/index.d.ts +28 -26
- package/package.json +28 -34
- package/dist/tests.d.ts +0 -1
package/README.md
CHANGED
|
@@ -11,16 +11,18 @@ Unlike `URL`, `QuasiURL`:
|
|
|
11
11
|
- preserves templating characters without URL-encoding them;
|
|
12
12
|
- doesn't implement the entire `URL` spec.
|
|
13
13
|
|
|
14
|
-
```
|
|
14
|
+
```js
|
|
15
|
+
import { QuasiURL } from "quasiurl";
|
|
16
|
+
|
|
15
17
|
new URL("/x").href
|
|
16
|
-
|
|
18
|
+
// TypeError: URL constructor: /x is not a valid URL.
|
|
17
19
|
|
|
18
20
|
new QuasiURL("/x").href
|
|
19
|
-
|
|
21
|
+
// "/x"
|
|
20
22
|
|
|
21
23
|
new URL("https://a.aa/x{/:name}").pathname
|
|
22
|
-
|
|
24
|
+
// "/x%7B/:name%7D"
|
|
23
25
|
|
|
24
26
|
new QuasiURL("https://a.aa/x{/:name}").pathname
|
|
25
|
-
|
|
27
|
+
// "/x{/:name}"
|
|
26
28
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -4,30 +4,32 @@
|
|
|
4
4
|
* - preserves templating characters without URL-encoding them.
|
|
5
5
|
*/
|
|
6
6
|
export declare class QuasiURL {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
7
|
+
_protocol: string;
|
|
8
|
+
_hostname: string;
|
|
9
|
+
_port: string;
|
|
10
|
+
_pathname: string;
|
|
11
|
+
_search: string;
|
|
12
|
+
_hash: string;
|
|
13
|
+
constructor(url: string);
|
|
14
|
+
get href(): string;
|
|
15
|
+
set href(value: string);
|
|
16
|
+
get protocol(): string;
|
|
17
|
+
set protocol(value: string);
|
|
18
|
+
get hostname(): string;
|
|
19
|
+
set hostname(value: string);
|
|
20
|
+
get port(): string;
|
|
21
|
+
set port(value: string | number);
|
|
22
|
+
get host(): string;
|
|
23
|
+
set host(value: string);
|
|
24
|
+
get origin(): string;
|
|
25
|
+
set origin(value: string);
|
|
26
|
+
get pathname(): string;
|
|
27
|
+
set pathname(value: string);
|
|
28
|
+
get search(): string;
|
|
29
|
+
set search(value: string | URLSearchParams);
|
|
30
|
+
get hash(): string;
|
|
31
|
+
set hash(value: string);
|
|
32
|
+
toString(): string;
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "quasiurl",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "URL for templating",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
],
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/node": "^24.0.4",
|
|
32
|
-
"typescript": "^5.9.2"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "quasiurl",
|
|
3
|
+
"version": "1.1.8",
|
|
4
|
+
"description": "URL for templating",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"clean": "node -e \"require('node:fs').rmSync('dist', { force: true, recursive: true });\"",
|
|
10
|
+
"compile": "npx esbuild index.ts --bundle --outdir=dist --platform=neutral",
|
|
11
|
+
"preversion": "npx npm-run-all clean shape compile test",
|
|
12
|
+
"shape": "npx codeshape --typecheck --emit-types",
|
|
13
|
+
"test": "node tests.ts"
|
|
14
|
+
},
|
|
15
|
+
"author": "axtk",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git://github.com/t8js/quasiurl.git"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"url",
|
|
23
|
+
"template"
|
|
24
|
+
],
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^24.0.4"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist/tests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|