@aidc-toolkit/utility 0.9.11-beta → 0.9.12-beta
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/dist/index.cjs
CHANGED
|
@@ -854,7 +854,7 @@ var CharacterSetValidator = class _CharacterSetValidator {
|
|
|
854
854
|
* Array of indexes for each character or undefined if the character is not in the character set.
|
|
855
855
|
*/
|
|
856
856
|
characterIndexes(s) {
|
|
857
|
-
return
|
|
857
|
+
return Array.from(s).map((c) => this._characterSetMap.get(c));
|
|
858
858
|
}
|
|
859
859
|
/**
|
|
860
860
|
* Convert a component definition to a string or undefined. Checks the type of the component and makes the callback
|
package/dist/index.js
CHANGED
|
@@ -801,7 +801,7 @@ var CharacterSetValidator = class _CharacterSetValidator {
|
|
|
801
801
|
* Array of indexes for each character or undefined if the character is not in the character set.
|
|
802
802
|
*/
|
|
803
803
|
characterIndexes(s) {
|
|
804
|
-
return
|
|
804
|
+
return Array.from(s).map((c) => this._characterSetMap.get(c));
|
|
805
805
|
}
|
|
806
806
|
/**
|
|
807
807
|
* Convert a component definition to a string or undefined. Checks the type of the component and makes the callback
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aidc-toolkit/utility",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.12-beta",
|
|
4
4
|
"description": "Foundational utilities for AIDC Toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,15 +25,16 @@
|
|
|
25
25
|
"test": "vitest run"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@aidc-toolkit/dev": "^0.9.
|
|
29
|
-
"eslint": "^9.
|
|
28
|
+
"@aidc-toolkit/dev": "^0.9.12-beta",
|
|
29
|
+
"eslint": "^9.20.1",
|
|
30
|
+
"jiti": "^2.4.2",
|
|
30
31
|
"ts-node": "^10.9.2",
|
|
31
|
-
"tsup": "^8.3.
|
|
32
|
+
"tsup": "^8.3.6",
|
|
32
33
|
"typescript": "^5.7.3",
|
|
33
|
-
"vitest": "^
|
|
34
|
+
"vitest": "^3.0.5"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@aidc-toolkit/core": "^0.9.
|
|
37
|
-
"i18next": "^24.2.
|
|
37
|
+
"@aidc-toolkit/core": "^0.9.12-beta",
|
|
38
|
+
"i18next": "^24.2.2"
|
|
38
39
|
}
|
|
39
40
|
}
|
package/src/character-set.ts
CHANGED
|
@@ -172,7 +172,7 @@ export class CharacterSetValidator implements StringValidator<CharacterSetValida
|
|
|
172
172
|
* Array of indexes for each character or undefined if the character is not in the character set.
|
|
173
173
|
*/
|
|
174
174
|
characterIndexes(s: string): ReadonlyArray<number | undefined> {
|
|
175
|
-
return
|
|
175
|
+
return Array.from(s).map(c => this._characterSetMap.get(c));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/**
|
package/test/transformer.test.ts
CHANGED
|
@@ -113,7 +113,10 @@ describe("Encryption", () => {
|
|
|
113
113
|
testTransformer(10, 1);
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
test("Large domain and tweak",
|
|
116
|
+
test("Large domain and tweak", {
|
|
117
|
+
// Test can take a long time.
|
|
118
|
+
timeout: 2 * 60 * 1000
|
|
119
|
+
}, () => {
|
|
117
120
|
testTransformer(100000, 123456);
|
|
118
121
|
});
|
|
119
122
|
|
|
File without changes
|