@aidc-toolkit/utility 0.9.10-beta → 0.9.11-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 +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/src/character-set.ts +2 -2
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 s.split("").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.d.cts
CHANGED
|
@@ -868,7 +868,7 @@ declare class CharacterSetCreator extends CharacterSetValidator {
|
|
|
868
868
|
* @returns
|
|
869
869
|
* String(s) created from the value(s).
|
|
870
870
|
*/
|
|
871
|
-
create<
|
|
871
|
+
create<TTransformerInput extends TransformerInput<number | bigint>>(length: number, valueOrValues: TTransformerInput, exclusion?: Exclusion, tweak?: number | bigint, creatorCallback?: TransformerCallback<string, string>): TransformerOutput<TTransformerInput, string>;
|
|
872
872
|
/**
|
|
873
873
|
* Determine the value for a string.
|
|
874
874
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -868,7 +868,7 @@ declare class CharacterSetCreator extends CharacterSetValidator {
|
|
|
868
868
|
* @returns
|
|
869
869
|
* String(s) created from the value(s).
|
|
870
870
|
*/
|
|
871
|
-
create<
|
|
871
|
+
create<TTransformerInput extends TransformerInput<number | bigint>>(length: number, valueOrValues: TTransformerInput, exclusion?: Exclusion, tweak?: number | bigint, creatorCallback?: TransformerCallback<string, string>): TransformerOutput<TTransformerInput, string>;
|
|
872
872
|
/**
|
|
873
873
|
* Determine the value for a string.
|
|
874
874
|
*
|
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 s.split("").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.11-beta",
|
|
4
4
|
"description": "Foundational utilities for AIDC Toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,15 +25,15 @@
|
|
|
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.11-beta",
|
|
29
|
+
"eslint": "^9.18.0",
|
|
30
30
|
"ts-node": "^10.9.2",
|
|
31
31
|
"tsup": "^8.3.5",
|
|
32
|
-
"typescript": "^5.7.
|
|
32
|
+
"typescript": "^5.7.3",
|
|
33
33
|
"vitest": "^2.1.8"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@aidc-toolkit/core": "^0.9.
|
|
36
|
+
"@aidc-toolkit/core": "^0.9.11-beta",
|
|
37
37
|
"i18next": "^24.2.1"
|
|
38
38
|
}
|
|
39
39
|
}
|
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 s.split("").map(c => this._characterSetMap.get(c));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/**
|
|
@@ -550,7 +550,7 @@ export class CharacterSetCreator extends CharacterSetValidator {
|
|
|
550
550
|
* @returns
|
|
551
551
|
* String(s) created from the value(s).
|
|
552
552
|
*/
|
|
553
|
-
create<
|
|
553
|
+
create<TTransformerInput extends TransformerInput<number | bigint>>(length: number, valueOrValues: TTransformerInput, exclusion: Exclusion = Exclusion.None, tweak?: number | bigint, creatorCallback?: TransformerCallback<string, string>): TransformerOutput<TTransformerInput, string> {
|
|
554
554
|
this.validateLength(length);
|
|
555
555
|
this.validateExclusion(exclusion);
|
|
556
556
|
|