es-toolkit 1.10.1-dev.222 → 1.10.1-dev.224
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/array/dropRightWhile.js +6 -14
- package/dist/array/dropRightWhile.js.map +1 -1
- package/dist/array/dropRightWhile.mjs +1 -2
- package/dist/array/index.js +10 -7
- package/dist/array/index.js.map +1 -1
- package/dist/array/index.mjs +1 -1
- package/dist/chunk-M7SBBYV2.mjs +14 -0
- package/dist/chunk-M7SBBYV2.mjs.map +1 -0
- package/dist/compat/index.js +10 -7
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +11 -11
- package/dist/function/index.mjs +6 -6
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -11
- package/package.json +1 -1
- package/dist/chunk-JE6JKZU3.mjs +0 -15
- package/dist/chunk-JE6JKZU3.mjs.map +0 -1
package/dist/compat/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ import {
|
|
|
206
206
|
} from "../chunk-JEKUA56R.mjs";
|
|
207
207
|
import {
|
|
208
208
|
dropRightWhile
|
|
209
|
-
} from "../chunk-
|
|
209
|
+
} from "../chunk-M7SBBYV2.mjs";
|
|
210
210
|
import {
|
|
211
211
|
dropWhile
|
|
212
212
|
} from "../chunk-LJ2C6MVP.mjs";
|
|
@@ -222,10 +222,6 @@ import {
|
|
|
222
222
|
import {
|
|
223
223
|
flatten
|
|
224
224
|
} from "../chunk-33MSBDC6.mjs";
|
|
225
|
-
import "../chunk-FZEZH22H.mjs";
|
|
226
|
-
import {
|
|
227
|
-
AbortError
|
|
228
|
-
} from "../chunk-DXB7EZUQ.mjs";
|
|
229
225
|
import {
|
|
230
226
|
chunk
|
|
231
227
|
} from "../chunk-E6C5EZQA.mjs";
|
|
@@ -244,7 +240,17 @@ import {
|
|
|
244
240
|
import {
|
|
245
241
|
differenceWith
|
|
246
242
|
} from "../chunk-6NVQAHXP.mjs";
|
|
243
|
+
import "../chunk-FZEZH22H.mjs";
|
|
244
|
+
import {
|
|
245
|
+
AbortError
|
|
246
|
+
} from "../chunk-DXB7EZUQ.mjs";
|
|
247
247
|
import "../chunk-236H5JZJ.mjs";
|
|
248
|
+
import {
|
|
249
|
+
once
|
|
250
|
+
} from "../chunk-CMBC4MXG.mjs";
|
|
251
|
+
import {
|
|
252
|
+
throttle
|
|
253
|
+
} from "../chunk-QOJGMVVR.mjs";
|
|
248
254
|
import {
|
|
249
255
|
debounce
|
|
250
256
|
} from "../chunk-3IP4JVLL.mjs";
|
|
@@ -254,12 +260,6 @@ import {
|
|
|
254
260
|
import {
|
|
255
261
|
noop
|
|
256
262
|
} from "../chunk-LKXCOLNY.mjs";
|
|
257
|
-
import {
|
|
258
|
-
once
|
|
259
|
-
} from "../chunk-CMBC4MXG.mjs";
|
|
260
|
-
import {
|
|
261
|
-
throttle
|
|
262
|
-
} from "../chunk-QOJGMVVR.mjs";
|
|
263
263
|
import "../chunk-2MM5EJJX.mjs";
|
|
264
264
|
|
|
265
265
|
// src/compat/array/chunk.ts
|
package/dist/function/index.mjs
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import "../chunk-236H5JZJ.mjs";
|
|
2
|
+
import {
|
|
3
|
+
once
|
|
4
|
+
} from "../chunk-CMBC4MXG.mjs";
|
|
5
|
+
import {
|
|
6
|
+
throttle
|
|
7
|
+
} from "../chunk-QOJGMVVR.mjs";
|
|
2
8
|
import {
|
|
3
9
|
debounce
|
|
4
10
|
} from "../chunk-3IP4JVLL.mjs";
|
|
@@ -8,12 +14,6 @@ import {
|
|
|
8
14
|
import {
|
|
9
15
|
noop
|
|
10
16
|
} 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
|
@@ -191,6 +191,16 @@ function dropRight(arr, itemsCount) {
|
|
|
191
191
|
return arr.slice(0, -itemsCount);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
// src/array/dropRightWhile.ts
|
|
195
|
+
function dropRightWhile(arr, canContinueDropping) {
|
|
196
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
197
|
+
if (!canContinueDropping(arr[i])) {
|
|
198
|
+
return arr.slice(0, i + 1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return [];
|
|
202
|
+
}
|
|
203
|
+
|
|
194
204
|
// src/array/dropWhile.ts
|
|
195
205
|
function dropWhile(arr, canContinueDropping) {
|
|
196
206
|
const dropEndIndex = arr.findIndex((item) => !canContinueDropping(item));
|
|
@@ -200,13 +210,6 @@ function dropWhile(arr, canContinueDropping) {
|
|
|
200
210
|
return arr.slice(dropEndIndex);
|
|
201
211
|
}
|
|
202
212
|
|
|
203
|
-
// src/array/dropRightWhile.ts
|
|
204
|
-
function dropRightWhile(arr, canContinueDropping) {
|
|
205
|
-
const reversed = arr.slice().reverse();
|
|
206
|
-
const dropped = dropWhile(reversed, canContinueDropping);
|
|
207
|
-
return dropped.slice().reverse();
|
|
208
|
-
}
|
|
209
|
-
|
|
210
213
|
// src/array/fill.ts
|
|
211
214
|
function fill(arr, value, start = 0, end = arr.length) {
|
|
212
215
|
start = Math.max(start, 0);
|