UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

18 lines (17 loc) 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fill = void 0; const baseFill_1 = require("./.internal/baseFill"); const isIterateeCall_1 = require("./.internal/isIterateeCall"); function fill(array, value, start = 0, end = array?.length) { const length = array == null ? 0 : array.length; if (!length) { return []; } if (start && typeof start != "number" && (0, isIterateeCall_1.isIterateeCall)(array, value, start)) { start = 0; end = length; } return (0, baseFill_1.baseFill)(array, value, start, end); } exports.fill = fill;