You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
288 B
12 lines
288 B
2 years ago
|
var isUndef = require('./isUndef');
|
||
|
exports = function(arr, val, start, end) {
|
||
|
var len = arr.length;
|
||
|
if (!len) return [];
|
||
|
if (isUndef(end)) end = len;
|
||
|
if (isUndef(start)) start = 0;
|
||
|
while (start < end) arr[start++] = val;
|
||
|
return arr;
|
||
|
};
|
||
|
|
||
|
module.exports = exports;
|