mixlea-utils-js 0.1.76 → 0.1.78

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.
@@ -121,6 +121,8 @@ export declare function arrayLastItem<T>(arr: T[]): T;
121
121
 
122
122
  export declare function arrayLastPick<T = any>(arr: T[], num?: number): any[];
123
123
 
124
+ export declare function arrayLoopInsert<R extends Record<string, any>>(arr: R[], inserts: (prevRow: R | null, nextRow: R | null, arr: R[]) => R[] | null | undefined): R[];
125
+
124
126
  export declare function arrayMap<T = any, R = any>(arr: T[], callback: (record: T, index: number, arr: T[]) => R): R[];
125
127
 
126
128
  export declare function arrayMapToObject(arr: any[], fieldFn: (arrItem: any) => string, valueFn: (arrItem: any) => any, option?: {
@@ -1354,6 +1356,8 @@ export declare function sumBy<T>(arr: T[], getter: string | ((item: T) => number
1354
1356
  replaceNaNResult?: number;
1355
1357
  }): number;
1356
1358
 
1359
+ export declare function sumByFields<T extends Record<string, any>>(arr: T[], fields: string[]): number;
1360
+
1357
1361
  export declare function SWITCH(key: any, map: ISwitchMap): any;
1358
1362
 
1359
1363
  export declare function switchCase(condition: any, cases: Record<any, any>): any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mixlea-utils-js",
3
3
  "type": "module",
4
- "version": "0.1.76",
4
+ "version": "0.1.78",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",
7
7
  "exports": {