es-toolkit 1.10.1-dev.243 → 1.10.1-dev.244

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.
@@ -77,6 +77,22 @@ import {
77
77
  import {
78
78
  sum
79
79
  } from "../chunk-2SLTL4KL.mjs";
80
+ import "../chunk-236H5JZJ.mjs";
81
+ import {
82
+ debounce
83
+ } from "../chunk-3IP4JVLL.mjs";
84
+ import {
85
+ negate
86
+ } from "../chunk-BOOQBJN2.mjs";
87
+ import {
88
+ noop
89
+ } from "../chunk-LKXCOLNY.mjs";
90
+ import {
91
+ once
92
+ } from "../chunk-CMBC4MXG.mjs";
93
+ import {
94
+ throttle
95
+ } from "../chunk-QOJGMVVR.mjs";
80
96
  import {
81
97
  clamp
82
98
  } from "../chunk-MLCL773E.mjs";
@@ -84,6 +100,12 @@ import {
84
100
  inRange
85
101
  } from "../chunk-BH6HLGBA.mjs";
86
102
  import "../chunk-DDH7K4QM.mjs";
103
+ import {
104
+ unzipWith
105
+ } from "../chunk-IFNXROZR.mjs";
106
+ import {
107
+ without
108
+ } from "../chunk-PYEYV7BY.mjs";
87
109
  import {
88
110
  xor
89
111
  } from "../chunk-L7FQX5MN.mjs";
@@ -102,12 +124,21 @@ import {
102
124
  import {
103
125
  zipWith
104
126
  } from "../chunk-4KYXHZ4R.mjs";
127
+ import {
128
+ toFilled
129
+ } from "../chunk-OP4OAKQJ.mjs";
130
+ import {
131
+ union
132
+ } from "../chunk-R6QA7PLZ.mjs";
105
133
  import {
106
134
  unionBy
107
135
  } from "../chunk-NFS7RWWE.mjs";
108
136
  import {
109
137
  unionWith
110
138
  } from "../chunk-2ZCITDMK.mjs";
139
+ import {
140
+ uniq
141
+ } from "../chunk-DVK2N4KC.mjs";
111
142
  import {
112
143
  uniqBy
113
144
  } from "../chunk-OXAZEEGP.mjs";
@@ -118,11 +149,17 @@ import {
118
149
  unzip
119
150
  } from "../chunk-UYZKMBDO.mjs";
120
151
  import {
121
- unzipWith
122
- } from "../chunk-IFNXROZR.mjs";
152
+ sample
153
+ } from "../chunk-2KNLZB7V.mjs";
123
154
  import {
124
- without
125
- } from "../chunk-PYEYV7BY.mjs";
155
+ sampleSize
156
+ } from "../chunk-EHSKB6DF.mjs";
157
+ import {
158
+ randomInt
159
+ } from "../chunk-GIWAOOFY.mjs";
160
+ import {
161
+ random
162
+ } from "../chunk-SYWMYQYJ.mjs";
126
163
  import {
127
164
  shuffle
128
165
  } from "../chunk-G7UQ5PUR.mjs";
@@ -142,14 +179,11 @@ import {
142
179
  takeWhile
143
180
  } from "../chunk-2IXFGSUA.mjs";
144
181
  import {
145
- toFilled
146
- } from "../chunk-OP4OAKQJ.mjs";
147
- import {
148
- union
149
- } from "../chunk-R6QA7PLZ.mjs";
182
+ intersectionBy
183
+ } from "../chunk-O6UXZR3U.mjs";
150
184
  import {
151
- uniq
152
- } from "../chunk-DVK2N4KC.mjs";
185
+ intersectionWith
186
+ } from "../chunk-XI7KRD2C.mjs";
153
187
  import {
154
188
  keyBy
155
189
  } from "../chunk-AJKZMN2V.mjs";
@@ -169,17 +203,8 @@ import {
169
203
  partition
170
204
  } from "../chunk-DN3NOZ3H.mjs";
171
205
  import {
172
- sample
173
- } from "../chunk-2KNLZB7V.mjs";
174
- import {
175
- sampleSize
176
- } from "../chunk-EHSKB6DF.mjs";
177
- import {
178
- randomInt
179
- } from "../chunk-GIWAOOFY.mjs";
180
- import {
181
- random
182
- } from "../chunk-SYWMYQYJ.mjs";
206
+ flattenDeep
207
+ } from "../chunk-ML727RRJ.mjs";
183
208
  import {
184
209
  forEachRight
185
210
  } from "../chunk-IEA53J7P.mjs";
@@ -196,11 +221,11 @@ import {
196
221
  intersection
197
222
  } from "../chunk-FVVSE2F2.mjs";
198
223
  import {
199
- intersectionBy
200
- } from "../chunk-O6UXZR3U.mjs";
224
+ differenceBy
225
+ } from "../chunk-LVWX5B43.mjs";
201
226
  import {
202
- intersectionWith
203
- } from "../chunk-XI7KRD2C.mjs";
227
+ differenceWith
228
+ } from "../chunk-6NVQAHXP.mjs";
204
229
  import {
205
230
  drop
206
231
  } from "../chunk-S3CORED5.mjs";
@@ -215,16 +240,17 @@ import {
215
240
  } from "../chunk-LJ2C6MVP.mjs";
216
241
  import {
217
242
  fill
218
- } from "../chunk-6KP7CLVJ.mjs";
243
+ } from "../chunk-YFN6KOC4.mjs";
219
244
  import {
220
245
  flatMap
221
246
  } from "../chunk-UY76KTPE.mjs";
222
- import {
223
- flattenDeep
224
- } from "../chunk-ML727RRJ.mjs";
225
247
  import {
226
248
  flatten
227
249
  } from "../chunk-33MSBDC6.mjs";
250
+ import "../chunk-FZEZH22H.mjs";
251
+ import {
252
+ AbortError
253
+ } from "../chunk-DXB7EZUQ.mjs";
228
254
  import {
229
255
  chunk
230
256
  } from "../chunk-E6C5EZQA.mjs";
@@ -237,32 +263,6 @@ import {
237
263
  import {
238
264
  difference
239
265
  } from "../chunk-JPUKH67K.mjs";
240
- import {
241
- differenceBy
242
- } from "../chunk-LVWX5B43.mjs";
243
- import {
244
- differenceWith
245
- } from "../chunk-6NVQAHXP.mjs";
246
- import "../chunk-FZEZH22H.mjs";
247
- import {
248
- AbortError
249
- } from "../chunk-DXB7EZUQ.mjs";
250
- import "../chunk-236H5JZJ.mjs";
251
- import {
252
- once
253
- } from "../chunk-CMBC4MXG.mjs";
254
- import {
255
- throttle
256
- } from "../chunk-QOJGMVVR.mjs";
257
- import {
258
- debounce
259
- } from "../chunk-3IP4JVLL.mjs";
260
- import {
261
- negate
262
- } from "../chunk-BOOQBJN2.mjs";
263
- import {
264
- noop
265
- } from "../chunk-LKXCOLNY.mjs";
266
266
  import "../chunk-2MM5EJJX.mjs";
267
267
 
268
268
  // src/compat/array/chunk.ts
@@ -1,10 +1,4 @@
1
1
  import "../chunk-236H5JZJ.mjs";
2
- import {
3
- once
4
- } from "../chunk-CMBC4MXG.mjs";
5
- import {
6
- throttle
7
- } from "../chunk-QOJGMVVR.mjs";
8
2
  import {
9
3
  debounce
10
4
  } from "../chunk-3IP4JVLL.mjs";
@@ -14,6 +8,12 @@ import {
14
8
  import {
15
9
  noop
16
10
  } from "../chunk-LKXCOLNY.mjs";
11
+ import {
12
+ once
13
+ } from "../chunk-CMBC4MXG.mjs";
14
+ import {
15
+ throttle
16
+ } from "../chunk-QOJGMVVR.mjs";
17
17
  import "../chunk-2MM5EJJX.mjs";
18
18
  export {
19
19
  debounce,
package/dist/index.js CHANGED
@@ -212,13 +212,14 @@ function dropWhile(arr, canContinueDropping) {
212
212
  }
213
213
 
214
214
  // src/array/fill.ts
215
- function fill(arr, value, start = 0, end = arr.length) {
216
- start = Math.max(start, 0);
217
- end = Math.min(end, arr.length);
218
- for (let i = start; i < end; i++) {
219
- arr[i] = value;
215
+ function fill(array, value, start = 0, end = array.length) {
216
+ const length = array.length;
217
+ const finalStart = Math.max(start >= 0 ? start : length + start, 0);
218
+ const finalEnd = Math.min(end >= 0 ? end : length + end, length);
219
+ for (let i = finalStart; i < finalEnd; i++) {
220
+ array[i] = value;
220
221
  }
221
- return arr;
222
+ return array;
222
223
  }
223
224
 
224
225
  // src/array/flatten.ts