@8ms/helpers 2.3.11 → 2.3.12
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/.yarn/install-state.gz +0 -0
- package/dist/lodash/index.d.mts +7 -1
- package/dist/lodash/index.mjs +13 -1
- package/dist/util/index.d.mts +1 -1
- package/dist/util/index.mjs +1 -2
- package/package.json +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/dist/lodash/index.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
//#region src/lodash/chunk.d.ts
|
|
2
|
+
declare const chunk: <T>(array: T[], size: number) => T[][];
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/lodash/flatten.d.ts
|
|
5
|
+
declare const flatten: <T>(array: T[][]) => T[];
|
|
6
|
+
//#endregion
|
|
1
7
|
//#region src/lodash/set.d.ts
|
|
2
8
|
declare const set: <T extends object>(obj: T, path: string | string[], value: unknown) => T;
|
|
3
9
|
//#endregion
|
|
@@ -33,4 +39,4 @@ declare const uniq: (arr: any[]) => any[];
|
|
|
33
39
|
//#region src/lodash/uniqBy.d.ts
|
|
34
40
|
declare const uniqBy: <T>(collection: T[], iteratee: ((item: T) => unknown) | string) => T[];
|
|
35
41
|
//#endregion
|
|
36
|
-
export { isDate, isEmpty, isEqual, isObject, merge, orderBy, set, trim, unescape, uniq, uniqBy };
|
|
42
|
+
export { chunk, flatten, isDate, isEmpty, isEqual, isObject, merge, orderBy, set, trim, unescape, uniq, uniqBy };
|
package/dist/lodash/index.mjs
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
//#region src/lodash/chunk.ts
|
|
2
|
+
const chunk = (array, size) => {
|
|
3
|
+
const result = [];
|
|
4
|
+
for (let i = 0; i < array.length; i += size) result.push(array.slice(i, i + size));
|
|
5
|
+
return result;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/lodash/flatten.ts
|
|
10
|
+
const flatten = (array) => [].concat(...array);
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
1
13
|
//#region src/lodash/set.ts
|
|
2
14
|
const set = (obj, path, value) => {
|
|
3
15
|
if (obj == null) return obj;
|
|
@@ -157,4 +169,4 @@ const uniqBy = (collection, iteratee) => {
|
|
|
157
169
|
};
|
|
158
170
|
|
|
159
171
|
//#endregion
|
|
160
|
-
export { isDate, isEmpty, isEqual, isObject, merge, orderBy, set, trim, unescape, uniq, uniqBy };
|
|
172
|
+
export { chunk, flatten, isDate, isEmpty, isEqual, isObject, merge, orderBy, set, trim, unescape, uniq, uniqBy };
|
package/dist/util/index.d.mts
CHANGED
|
@@ -39,7 +39,7 @@ declare const isUndefined: (instance: any, keys: any | any[]) => boolean;
|
|
|
39
39
|
* Chunk a queue of promises into controlled chunks to prevent overloading.
|
|
40
40
|
* https://stackoverflow.com/a/53964407
|
|
41
41
|
*/
|
|
42
|
-
declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSeconds?: number, callbackFunction?: Function) => Promise<
|
|
42
|
+
declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSeconds?: number, callbackFunction?: Function) => Promise<unknown[]>;
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/util/sleep.d.ts
|
|
45
45
|
declare const sleep: (seconds: number) => Promise<void>;
|
package/dist/util/index.mjs
CHANGED