@esmalley/ts-utils 5.0.0 → 6.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 +615 -1
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/package.json +1 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/index.js.map +3 -3
- package/dist/types/Arrayifier.d.ts +3 -3
- package/dist/types/Arrayifier.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -4,7 +4,7 @@ export declare class Arrayifier {
|
|
|
4
4
|
* @param {array} array The array to shuffle
|
|
5
5
|
* @return array
|
|
6
6
|
*/
|
|
7
|
-
shuffle(array:
|
|
7
|
+
static shuffle<T>(array: T[]): T[];
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* @param {Array} arr
|
|
@@ -16,7 +16,7 @@ export declare class Arrayifier {
|
|
|
16
16
|
* @param {Array} results
|
|
17
17
|
* @returns Array
|
|
18
18
|
*/
|
|
19
|
-
combination(arr:
|
|
19
|
+
static combination<T>(arr: T[], n: number, r: number, index: number, data: T[], i: number, results: T[][]): T[][];
|
|
20
20
|
/**
|
|
21
21
|
* Get all combinations of every value in the provided array for a specified number
|
|
22
22
|
* @param {Array} arr
|
|
@@ -24,6 +24,6 @@ export declare class Arrayifier {
|
|
|
24
24
|
* @param {number} r
|
|
25
25
|
* @returns Array
|
|
26
26
|
*/
|
|
27
|
-
getCombinations(arr:
|
|
27
|
+
static getCombinations<T>(arr: T[], n: number, r: number): T[][];
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=Arrayifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Arrayifier.d.ts","sourceRoot":"","sources":["../../src/Arrayifier.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;IAKrB;;;;QAII;
|
|
1
|
+
{"version":3,"file":"Arrayifier.d.ts","sourceRoot":"","sources":["../../src/Arrayifier.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;IAKrB;;;;QAII;WACU,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;IAkBzC;;;;;;;;;;QAUI;WACU,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE;IAiBhH;;;;;;QAMI;WACU,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAOhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esmalley/ts-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist/types",
|
|
14
14
|
"build:js": "node build.mjs",
|
|
15
15
|
"build": "npm run clean && npm run build:types && npm run build:js && npm run fix:cjs",
|
|
16
|
-
"fix:cjs": "
|
|
16
|
+
"fix:cjs": "node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({type:'commonjs'}))\"",
|
|
17
17
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
18
18
|
"prepublishOnly": "npm run build"
|
|
19
19
|
},
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
63
63
|
"globals": "^16.0.0",
|
|
64
64
|
"ts-jest": "^29.4.6",
|
|
65
|
+
"ts-node": "^10.9.2",
|
|
65
66
|
"typescript": "^5.5.3",
|
|
66
67
|
"typescript-eslint": "^8.26.1"
|
|
67
68
|
}
|