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.
@@ -206,7 +206,7 @@ import {
206
206
  } from "../chunk-JEKUA56R.mjs";
207
207
  import {
208
208
  dropRightWhile
209
- } from "../chunk-JE6JKZU3.mjs";
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
@@ -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);