@extra-array/fill.min
TypeScript icon, indicating that this package has built-in type declarations

2.10.19 • Public • Published

Fills with given value. 📦 😺 🏃 📼 🌔 📜 📰 📘

Alternatives: fill, fill$.

This is part of package extra-array.

This is browserified, minified version of @extra-array/fill.
It is exported as global variable array_fill.
CDN: unpkg, jsDelivr.


array.fill(x, v, [i], [I]);
// x: an array
// v: value
// i: start index (0)
// I: end index (X)
const array = require("extra-array");

var x = [1, 2, 3, 4];
array.fill(x, 2);
// [ 2, 2, 2, 2 ]

array.fill(x, 2, 1);
// [ 1, 2, 2, 2 ]

array.fill(x, 2, 1, 3);
// [ 1, 2, 2, 4 ]


References

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @extra-array/fill.min

      Weekly Downloads

      376

      Version

      2.10.19

      License

      MIT

      Unpacked Size

      4.9 kB

      Total Files

      8

      Last publish

      Collaborators

      • wolfram77