baja-lite 1.3.41 → 1.3.42
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 +1 -1
- package/object.js +4 -2
- package/package.json +1 -1
package/object.d.ts
CHANGED
|
@@ -81,4 +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
|
|
84
|
+
export declare function fillArrayToMinLength<T>(arr: T[], minLength: number, fillValue: T): T[];
|
package/object.js
CHANGED
|
@@ -220,6 +220,8 @@ export function P2C2(datas) {
|
|
|
220
220
|
return datas;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
export function fillArrayToMinLength(arr, minLength
|
|
224
|
-
|
|
223
|
+
export function fillArrayToMinLength(arr, minLength, fillValue) {
|
|
224
|
+
while (arr.length < minLength)
|
|
225
|
+
arr.push(fillValue);
|
|
226
|
+
return arr;
|
|
225
227
|
}
|