@supernova-studio/model 0.58.15 → 0.58.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.58.15",
3
+ "version": "0.58.16",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -158,6 +158,14 @@ export function isNullish<T>(value: T | null | undefined): value is null | undef
158
158
  return value === null || value === undefined;
159
159
  }
160
160
 
161
+ export function chunkedArray<V>(array: V[], chunkSize: number): V[][] {
162
+ const result: V[][] = [];
163
+ for (let i = 0; i < array.length; i += chunkSize) {
164
+ result.push(array.slice(i, i + chunkSize));
165
+ }
166
+ return result;
167
+ }
168
+
161
169
  export type Pagination = {
162
170
  skip?: number;
163
171
  take?: number;