@naturalcycles/js-lib 15.8.0 → 15.8.1
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/dist/array/range.d.ts +1 -1
- package/dist/array/range.js +1 -1
- package/package.json +1 -1
- package/src/array/range.ts +1 -1
package/dist/array/range.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function _range(fromIncl: Integer, toExcl: Integer, step?: number
|
|
|
22
22
|
* Fill is Primitive, because it's safe to shallow-copy.
|
|
23
23
|
* If it was an object - it'll paste the same object reference, which can create bugs.
|
|
24
24
|
*/
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function _arrayFilled<T extends Primitive>(length: Integer, fill: T): T[];
|
|
26
26
|
/**
|
|
27
27
|
* Like _range, but returns an Iterable2.
|
|
28
28
|
*/
|
package/dist/array/range.js
CHANGED
|
@@ -19,7 +19,7 @@ export function _range(fromIncl, toExcl, step = 1) {
|
|
|
19
19
|
* Fill is Primitive, because it's safe to shallow-copy.
|
|
20
20
|
* If it was an object - it'll paste the same object reference, which can create bugs.
|
|
21
21
|
*/
|
|
22
|
-
export function
|
|
22
|
+
export function _arrayFilled(length, fill) {
|
|
23
23
|
// biome-ignore lint/style/useConsistentBuiltinInstantiation: ok
|
|
24
24
|
return Array(length).fill(fill);
|
|
25
25
|
}
|
package/package.json
CHANGED
package/src/array/range.ts
CHANGED
|
@@ -36,7 +36,7 @@ export function _range(fromIncl: Integer, toExcl?: Integer, step = 1): number[]
|
|
|
36
36
|
* Fill is Primitive, because it's safe to shallow-copy.
|
|
37
37
|
* If it was an object - it'll paste the same object reference, which can create bugs.
|
|
38
38
|
*/
|
|
39
|
-
export function
|
|
39
|
+
export function _arrayFilled<T extends Primitive>(length: Integer, fill: T): T[] {
|
|
40
40
|
// biome-ignore lint/style/useConsistentBuiltinInstantiation: ok
|
|
41
41
|
return Array(length).fill(fill)
|
|
42
42
|
}
|