MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / fill

Function fill

lib/web/jshint.js:6301–6311  ·  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 _ * @category Array * @param {Array} array The array to fill. * @param {*} value The value to fill

(array, value, start, end)

Source from the content-addressed store, hash-verified

6299 * // => [4, '*', 8]
6300 */
6301 function fill(array, value, start, end) {
6302 var length = array ? array.length : 0;
6303 if (!length) {
6304 return [];
6305 }
6306 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
6307 start = 0;
6308 end = length;
6309 }
6310 return baseFill(array, value, start, end);
6311 }
6312
6313 /**
6314 * 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