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/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
|
export {
|
|
265
265
|
AbortError,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.10.1-dev.
|
|
4
|
+
"version": "1.10.1-dev.224+aaf41e49",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|
package/dist/chunk-JE6JKZU3.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dropWhile
|
|
3
|
-
} from "./chunk-LJ2C6MVP.mjs";
|
|
4
|
-
|
|
5
|
-
// src/array/dropRightWhile.ts
|
|
6
|
-
function dropRightWhile(arr, canContinueDropping) {
|
|
7
|
-
const reversed = arr.slice().reverse();
|
|
8
|
-
const dropped = dropWhile(reversed, canContinueDropping);
|
|
9
|
-
return dropped.slice().reverse();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
dropRightWhile
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=chunk-JE6JKZU3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/dropRightWhile.ts"],"sourcesContent":["import { dropWhile } from './dropWhile.ts';\n\n/**\n * Removes elements from the end of an array until the predicate returns false.\n *\n * This function iterates over an array from the end and drops elements until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element from the end,\n * and dropping continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRightWhile(array, x => x > 3);\n * // result will be [1, 2, 3] since elements greater than 3 are dropped from the end.\n */\nexport function dropRightWhile<T>(arr: readonly T[], canContinueDropping: (item: T) => boolean): T[] {\n const reversed = arr.slice().reverse();\n const dropped = dropWhile(reversed, canContinueDropping);\n return dropped.slice().reverse();\n}\n"],"mappings":";;;;;AAoBO,SAAS,eAAkB,KAAmB,qBAAgD;AACnG,QAAM,WAAW,IAAI,MAAM,EAAE,QAAQ;AACrC,QAAM,UAAU,UAAU,UAAU,mBAAmB;AACvD,SAAO,QAAQ,MAAM,EAAE,QAAQ;AACjC;","names":[]}
|