es-toolkit 1.13.1-dev.307 → 1.13.1-dev.308

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -63,7 +63,7 @@ __export(compat_exports, {
63
63
  dropRightWhile: () => dropRightWhile,
64
64
  dropWhile: () => dropWhile,
65
65
  endsWith: () => endsWith,
66
- fill: () => fill,
66
+ fill: () => fill2,
67
67
  first: () => head,
68
68
  flatMap: () => flatMap,
69
69
  flatten: () => flatten,
@@ -1148,6 +1148,19 @@ function difference2(arr, ...values) {
1148
1148
  return difference(arr1, arr2);
1149
1149
  }
1150
1150
 
1151
+ // src/compat/array/fill.ts
1152
+ function fill2(array, value, start = 0, end = array.length) {
1153
+ start = Math.floor(start);
1154
+ end = Math.floor(end);
1155
+ if (!start) {
1156
+ start = 0;
1157
+ }
1158
+ if (!end) {
1159
+ end = 0;
1160
+ }
1161
+ return fill(array, value, start, end);
1162
+ }
1163
+
1151
1164
  // src/compat/_internal/isIndex.ts
1152
1165
  var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1153
1166
  function isIndex(value) {