@ctrl/magnet-link 4.0.1 → 4.1.0
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 +1 -1
- package/dist/src/bep53.js +1 -3
- package/package.json +14 -9
package/README.md
CHANGED
@@ -75,6 +75,6 @@ You can also use convenience key names like name (dn), infoHash (xt), infoHashIn
|
|
75
75
|
```
|
76
76
|
|
77
77
|
### See Also
|
78
|
+
- magnet-uri https://github.com/webtorrent/magnet-uri
|
78
79
|
- magnet uri spec http://www.bittorrent.org/beps/bep_0053.html
|
79
80
|
- more spec http://www.bittorrent.org/beps/bep_0009.html
|
80
|
-
- magnet-uri https://github.com/webtorrent/magnet-uri
|
package/dist/src/bep53.js
CHANGED
@@ -7,9 +7,7 @@ export function composeRange(range) {
|
|
7
7
|
acc[acc.length - 1].push(`${cur}`);
|
8
8
|
return acc;
|
9
9
|
}, [])
|
10
|
-
.map(cur => {
|
11
|
-
return cur.length > 1 ? `${cur[0]}-${cur[cur.length - 1]}` : `${cur[0]}`;
|
12
|
-
});
|
10
|
+
.map(cur => (cur.length > 1 ? `${cur[0]}-${cur[cur.length - 1]}` : `${cur[0]}`));
|
13
11
|
}
|
14
12
|
export function parseRange(range) {
|
15
13
|
const generateRange = (start, end = start) => Array.from({ length: end - start + 1 }, (_, idx) => idx + start);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/magnet-link",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "Parse a magnet URI into an object",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"homepage": "https://magnet-link.vercel.app",
|
@@ -23,8 +23,12 @@
|
|
23
23
|
"dev": "npm run demo:watch",
|
24
24
|
"demo:build": "npm run build --workspace=demo",
|
25
25
|
"demo:watch": "npm run dev --workspace=demo",
|
26
|
-
"lint": "
|
27
|
-
"lint:
|
26
|
+
"lint": "pnpm run '/^(lint:biome|lint:eslint)$/'",
|
27
|
+
"lint:biome": "biome check .",
|
28
|
+
"lint:eslint": "eslint --ext .ts,.tsx .",
|
29
|
+
"lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
|
30
|
+
"lint:eslint:fix": "eslint --ext .ts,.tsx . --fix",
|
31
|
+
"lint:biome:fix": "biome check . --apply",
|
28
32
|
"prepare": "npm run build",
|
29
33
|
"build": "tsc",
|
30
34
|
"test": "vitest run",
|
@@ -33,15 +37,16 @@
|
|
33
37
|
},
|
34
38
|
"dependencies": {
|
35
39
|
"rfc4648": "^1.5.3",
|
36
|
-
"uint8array-extras": "^1.
|
40
|
+
"uint8array-extras": "^1.1.0"
|
37
41
|
},
|
38
42
|
"devDependencies": {
|
39
|
-
"@
|
43
|
+
"@biomejs/biome": "1.6.0",
|
44
|
+
"@ctrl/eslint-config-biome": "2.1.1",
|
40
45
|
"@sindresorhus/tsconfig": "5.0.0",
|
41
|
-
"@types/node": "20.
|
42
|
-
"@vitest/coverage-v8": "1.1
|
43
|
-
"typescript": "5.
|
44
|
-
"vitest": "1.1
|
46
|
+
"@types/node": "20.11.25",
|
47
|
+
"@vitest/coverage-v8": "1.3.1",
|
48
|
+
"typescript": "5.4.2",
|
49
|
+
"vitest": "1.3.1"
|
45
50
|
},
|
46
51
|
"workspaces": [
|
47
52
|
"demo"
|