@winible/winible-typed 2.69.5 → 2.69.7
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.
@@ -8,7 +8,16 @@ const camelizeKeys = (obj) => {
|
|
8
8
|
return acc;
|
9
9
|
}, {});
|
10
10
|
};
|
11
|
+
const batchArray = (array, batchSize) => {
|
12
|
+
const batches = [];
|
13
|
+
for (let i = 0; i < array.length; i += batchSize) {
|
14
|
+
const batch = array.slice(i, i + batchSize);
|
15
|
+
batches.push(batch);
|
16
|
+
}
|
17
|
+
return batches;
|
18
|
+
};
|
11
19
|
exports.default = {
|
12
20
|
camelizeKeys,
|
21
|
+
batchArray,
|
13
22
|
};
|
14
23
|
//# sourceMappingURL=generalUtils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generalUtils.js","sourceRoot":"","sources":["../../utils/generalUtils.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,CAAgC,GAAM,EAAK,EAAE;IAChE,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,GAAG,CACD,GAAG;aACA,WAAW,EAAE;aACb,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAC7D,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAM,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe;IACb,YAAY;
|
1
|
+
{"version":3,"file":"generalUtils.js","sourceRoot":"","sources":["../../utils/generalUtils.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,CAAgC,GAAM,EAAK,EAAE;IAChE,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,GAAG,CACD,GAAG;aACA,WAAW,EAAE;aACb,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAC7D,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAM,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAI,KAAU,EAAE,SAAiB,EAAc,EAAE;IAClE,MAAM,OAAO,GAAe,EAAE,CAAC;IAE/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE;QAChD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACrB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,kBAAe;IACb,YAAY;IACZ,UAAU;CACX,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@winible/winible-typed",
|
3
|
-
"version": "2.69.
|
3
|
+
"version": "2.69.7",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"./dist/src/types": "./dist/src/types.js",
|
10
10
|
"./event-collector-models": "./dist/event-collector-models/index.js",
|
11
11
|
"./utils": "./dist/utils/index.js",
|
12
|
-
"./utils/
|
12
|
+
"./utils/lambdaUtils": "./dist/utils/lambdaUtils/index.js"
|
13
13
|
},
|
14
14
|
"scripts": {
|
15
15
|
"start": "nf start",
|
package/utils/generalUtils.ts
CHANGED
@@ -9,6 +9,18 @@ const camelizeKeys = <T extends Record<string, any>>(obj: T): T => {
|
|
9
9
|
}, {}) as T;
|
10
10
|
};
|
11
11
|
|
12
|
+
const batchArray = <T>(array: T[], batchSize: number): Array<T[]> => {
|
13
|
+
const batches: Array<T[]> = [];
|
14
|
+
|
15
|
+
for (let i = 0; i < array.length; i += batchSize) {
|
16
|
+
const batch = array.slice(i, i + batchSize);
|
17
|
+
batches.push(batch);
|
18
|
+
}
|
19
|
+
|
20
|
+
return batches;
|
21
|
+
};
|
22
|
+
|
12
23
|
export default {
|
13
24
|
camelizeKeys,
|
25
|
+
batchArray,
|
14
26
|
};
|