Sha256: de00cc0ee45e3b5f08e7398f688d3302fa3273a8ed4427a26c8b315eef820baf
Contents?: true
Size: 814 Bytes
Versions: 14
Compression:
Stored size: 814 Bytes
Contents
var baseFill = require('../internal/baseFill'), isIterateeCall = require('../internal/isIterateeCall'); /** * Fills elements of `array` with `value` from `start` up to, but not * including, `end`. * * **Note:** This method mutates `array`. * * @private * @param {Array} array The array to fill. * @param {*} value The value to fill `array` with. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns `array`. */ function fill(array, value, start, end) { var length = array ? array.length : 0; if (!length) { return []; } if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { start = 0; end = length; } return baseFill(array, value, start, end); } module.exports = fill;
Version data entries
14 entries across 7 versions & 1 rubygems