baja-lite 1.3.39 → 1.3.41

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/object.d.ts CHANGED
@@ -81,3 +81,4 @@ export declare function C2P2<T extends Object = any, L extends Object = T>(datas
81
81
  export declare function C2P2<T extends Object = any, L extends Object = T>(datas: L): T;
82
82
  export declare function P2C2<T extends Object = any, L extends Object = T>(datas: L[]): T[];
83
83
  export declare function P2C2<T extends Object = any, L extends Object = T>(datas: L): T;
84
+ export declare function fillArrayToMinLength<T>(arr: T[], minLength: number | undefined, fillValue: T): T[];
package/object.js CHANGED
@@ -1,4 +1,5 @@
1
- import iterate from "iterare";
1
+ import * as ite from 'iterare';
2
+ const iterate = ite.iterate;
2
3
  /**
3
4
  * 对象对象(等同与convertBean)
4
5
  * 仅会将classType有的属性进行转换
@@ -219,3 +220,6 @@ export function P2C2(datas) {
219
220
  return datas;
220
221
  }
221
222
  }
223
+ export function fillArrayToMinLength(arr, minLength = 2, fillValue) {
224
+ return arr.concat(Array(Math.max(minLength - arr.length, 0)).fill(fillValue));
225
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.3.39",
3
+ "version": "1.3.41",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/util-man",
6
6
  "repository": {