MCPcopy
hub / github.com/lodash/lodash / fill

Function fill

lodash.js:7297–7307  ·  view source on GitHub ↗

* Fills elements of `array` with `value` from `start` up to, but not * including, `end`. * * **Note:** This method mutates `array`. * * @static * @memberOf _ * @since 3.2.0 * @category Array * @param {Array} array The array to fill. * @param {*} valu

(array, value, start, end)

Source from the content-addressed store, hash-verified

7295 * // => [4, '*', '*', 10]
7296 */
7297 function fill(array, value, start, end) {
7298 var length = array == null ? 0 : array.length;
7299 if (!length) {
7300 return [];
7301 }
7302 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
7303 start = 0;
7304 end = length;
7305 }
7306 return baseFill(array, value, start, end);
7307 }
7308
7309 /**
7310 * This method is like `_.find` except that it returns the index of the first

Callers

nothing calls this directly

Calls 2

isIterateeCallFunction · 0.85
baseFillFunction · 0.85

Tested by

no test coverage detected