@regardio/js 0.5.0 → 0.6.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/LICENSE +1 -1
- package/dist/encoding/index.d.ts +6 -1
- package/dist/encoding/index.js +6 -1
- package/package.json +55 -50
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright ©
|
|
3
|
+
Copyright © 2026 Regardio
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/dist/encoding/index.d.ts
CHANGED
|
@@ -4,5 +4,10 @@
|
|
|
4
4
|
* @returns A Uint8Array containing the decoded data
|
|
5
5
|
*/
|
|
6
6
|
declare const urlBase64ToUint8Array: (base64String: string) => Uint8Array;
|
|
7
|
+
/**
|
|
8
|
+
* Generate a cryptographically secure random base64 string.
|
|
9
|
+
* @returns A base64-encoded random string (16 bytes of entropy)
|
|
10
|
+
*/
|
|
11
|
+
declare function generateRandomBase64(): string;
|
|
7
12
|
|
|
8
|
-
export { urlBase64ToUint8Array };
|
|
13
|
+
export { generateRandomBase64, urlBase64ToUint8Array };
|
package/dist/encoding/index.js
CHANGED
|
@@ -9,5 +9,10 @@ var urlBase64ToUint8Array = (base64String) => {
|
|
|
9
9
|
}
|
|
10
10
|
return outputArray;
|
|
11
11
|
};
|
|
12
|
+
function generateRandomBase64() {
|
|
13
|
+
const array = new Uint8Array(16);
|
|
14
|
+
crypto.getRandomValues(array);
|
|
15
|
+
return btoa(String.fromCharCode(...array));
|
|
16
|
+
}
|
|
12
17
|
|
|
13
|
-
export { urlBase64ToUint8Array };
|
|
18
|
+
export { generateRandomBase64, urlBase64ToUint8Array };
|
package/package.json
CHANGED
|
@@ -1,69 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
|
-
"
|
|
3
|
+
"name": "@regardio/js",
|
|
4
|
+
"version": "0.6.0",
|
|
5
|
+
"private": false,
|
|
6
|
+
"description": "Regardio JavaScript utilities",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"utilities",
|
|
9
|
+
"javascript",
|
|
10
|
+
"typescript",
|
|
11
|
+
"http",
|
|
12
|
+
"intl",
|
|
13
|
+
"validation",
|
|
14
|
+
"time",
|
|
15
|
+
"format"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/regardio/js#readme",
|
|
4
18
|
"bugs": {
|
|
5
19
|
"url": "https://github.com/regardio/js/issues"
|
|
6
20
|
},
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
},
|
|
11
|
-
"description": "Regardio JavaScript utilities",
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"@regardio/dev": "1.10.2",
|
|
14
|
-
"@total-typescript/ts-reset": "0.6.1",
|
|
15
|
-
"@types/node": "25.0.3",
|
|
16
|
-
"tsup": "8.5.1",
|
|
17
|
-
"vitest": "4.0.16"
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/regardio/js.git"
|
|
18
24
|
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": "Bernd Matzner <bernd.matzner@regard.io>",
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"type": "module",
|
|
19
29
|
"exports": {
|
|
20
30
|
"./assert": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
31
|
+
"types": "./dist/assert/index.d.ts",
|
|
32
|
+
"import": "./dist/assert/index.js"
|
|
23
33
|
},
|
|
24
34
|
"./encoding": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
35
|
+
"types": "./dist/encoding/index.d.ts",
|
|
36
|
+
"import": "./dist/encoding/index.js"
|
|
27
37
|
},
|
|
28
38
|
"./http": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
39
|
+
"types": "./dist/http/index.d.ts",
|
|
40
|
+
"import": "./dist/http/index.js"
|
|
31
41
|
},
|
|
32
42
|
"./intl": {
|
|
33
|
-
"
|
|
34
|
-
"
|
|
43
|
+
"types": "./dist/intl/index.d.ts",
|
|
44
|
+
"import": "./dist/intl/index.js"
|
|
35
45
|
},
|
|
36
46
|
"./text": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
47
|
+
"types": "./dist/text/index.d.ts",
|
|
48
|
+
"import": "./dist/text/index.js"
|
|
39
49
|
},
|
|
40
50
|
"./time": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
51
|
+
"types": "./dist/time/index.d.ts",
|
|
52
|
+
"import": "./dist/time/index.js"
|
|
43
53
|
}
|
|
44
54
|
},
|
|
45
|
-
"files": [
|
|
46
|
-
|
|
47
|
-
"keywords": [
|
|
48
|
-
"utilities",
|
|
49
|
-
"javascript",
|
|
50
|
-
"typescript",
|
|
51
|
-
"http",
|
|
52
|
-
"intl",
|
|
53
|
-
"validation",
|
|
54
|
-
"time",
|
|
55
|
-
"format"
|
|
55
|
+
"files": [
|
|
56
|
+
"dist"
|
|
56
57
|
],
|
|
57
|
-
"license": "MIT",
|
|
58
|
-
"name": "@regardio/js",
|
|
59
|
-
"private": false,
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
62
|
-
},
|
|
63
|
-
"repository": {
|
|
64
|
-
"type": "git",
|
|
65
|
-
"url": "git+https://github.com/regardio/js.git"
|
|
66
|
-
},
|
|
67
58
|
"scripts": {
|
|
68
59
|
"build": "tsup && post-build-exports && pnpm fix",
|
|
69
60
|
"clean": "exec-clean .turbo dist",
|
|
@@ -71,19 +62,33 @@
|
|
|
71
62
|
"fix": "exec-p fix:*",
|
|
72
63
|
"fix:biome": "lint-biome check --write --unsafe .",
|
|
73
64
|
"fix:md": "lint-md --fix",
|
|
65
|
+
"fix:pkg": "lint-package --fix",
|
|
74
66
|
"lint": "exec-p lint:*",
|
|
75
67
|
"lint:biome": "lint-biome check .",
|
|
76
68
|
"lint:md": "lint-md",
|
|
69
|
+
"lint:pkg": "lint-package",
|
|
77
70
|
"prepare": "exec-husky",
|
|
78
71
|
"release": "flow-release",
|
|
79
|
-
"report": "
|
|
80
|
-
"report:unit": "vitest run --reporter html",
|
|
72
|
+
"report": "vitest run --coverage",
|
|
81
73
|
"test": "exec-s test:*",
|
|
82
74
|
"test:unit": "vitest run",
|
|
83
75
|
"typecheck": "exec-tsc --noEmit",
|
|
84
76
|
"version": "flow-changeset version"
|
|
85
77
|
},
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"intl-parse-accept-language": "1.0.0",
|
|
80
|
+
"react-router": "7.12.0"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@regardio/dev": "1.11.1",
|
|
84
|
+
"@total-typescript/ts-reset": "0.6.1",
|
|
85
|
+
"@types/node": "25.0.3",
|
|
86
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
87
|
+
"@vitest/ui": "4.0.16",
|
|
88
|
+
"tsup": "8.5.1",
|
|
89
|
+
"vitest": "4.0.16"
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
}
|
|
89
94
|
}
|