Files
yusheng-h5/uni_modules/UniDevTools/node_modules/licia/fill.js

12 lines
288 B
JavaScript
Raw Normal View History

2025-08-11 11:06:07 +08:00
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;