MultiLoader-Template/node_modules/es-toolkit/dist/compat/array/fill.mjs
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

24 lines
559 B
JavaScript

import { fill as fill$1 } from '../../array/fill.mjs';
import { isArrayLike } from '../predicate/isArrayLike.mjs';
import { isString } from '../predicate/isString.mjs';
function fill(array, value, start = 0, end = array ? array.length : 0) {
if (!isArrayLike(array)) {
return [];
}
if (isString(array)) {
return array;
}
start = Math.floor(start);
end = Math.floor(end);
if (!start) {
start = 0;
}
if (!end) {
end = 0;
}
return fill$1(array, value, start, end);
}
export { fill };