es-toolkit 1.10.1-dev.239 → 1.10.1-dev.240
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/flatMap.js.map +1 -1
- package/dist/array/flatMap.mjs +1 -1
- package/dist/array/index.js.map +1 -1
- package/dist/array/index.mjs +15 -15
- package/dist/{chunk-KBXHURLW.mjs → chunk-UY76KTPE.mjs} +1 -1
- package/dist/chunk-UY76KTPE.mjs.map +1 -0
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/index.mjs +18 -18
- package/dist/function/index.mjs +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -18
- package/package.json +1 -1
- package/dist/chunk-KBXHURLW.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -86,6 +86,9 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
zipObjectDeep
|
|
88
88
|
} from "./chunk-MKCRW4QT.mjs";
|
|
89
|
+
import {
|
|
90
|
+
xor
|
|
91
|
+
} from "./chunk-L7FQX5MN.mjs";
|
|
89
92
|
import {
|
|
90
93
|
xorBy
|
|
91
94
|
} from "./chunk-Q47NGNXT.mjs";
|
|
@@ -101,6 +104,9 @@ import {
|
|
|
101
104
|
import {
|
|
102
105
|
zipWith
|
|
103
106
|
} from "./chunk-4KYXHZ4R.mjs";
|
|
107
|
+
import {
|
|
108
|
+
unionBy
|
|
109
|
+
} from "./chunk-NFS7RWWE.mjs";
|
|
104
110
|
import {
|
|
105
111
|
unionWith
|
|
106
112
|
} from "./chunk-2ZCITDMK.mjs";
|
|
@@ -120,8 +126,8 @@ import {
|
|
|
120
126
|
without
|
|
121
127
|
} from "./chunk-PYEYV7BY.mjs";
|
|
122
128
|
import {
|
|
123
|
-
|
|
124
|
-
} from "./chunk-
|
|
129
|
+
shuffle
|
|
130
|
+
} from "./chunk-G7UQ5PUR.mjs";
|
|
125
131
|
import {
|
|
126
132
|
tail
|
|
127
133
|
} from "./chunk-OF6NM4G7.mjs";
|
|
@@ -147,8 +153,8 @@ import {
|
|
|
147
153
|
uniq
|
|
148
154
|
} from "./chunk-DVK2N4KC.mjs";
|
|
149
155
|
import {
|
|
150
|
-
|
|
151
|
-
} from "./chunk-
|
|
156
|
+
keyBy
|
|
157
|
+
} from "./chunk-AJKZMN2V.mjs";
|
|
152
158
|
import {
|
|
153
159
|
last
|
|
154
160
|
} from "./chunk-KPBQ7OUY.mjs";
|
|
@@ -177,8 +183,8 @@ import {
|
|
|
177
183
|
random
|
|
178
184
|
} from "./chunk-SYWMYQYJ.mjs";
|
|
179
185
|
import {
|
|
180
|
-
|
|
181
|
-
} from "./chunk-
|
|
186
|
+
forEachRight
|
|
187
|
+
} from "./chunk-IEA53J7P.mjs";
|
|
182
188
|
import {
|
|
183
189
|
groupBy
|
|
184
190
|
} from "./chunk-E6E4RZLN.mjs";
|
|
@@ -198,8 +204,8 @@ import {
|
|
|
198
204
|
intersectionWith
|
|
199
205
|
} from "./chunk-XI7KRD2C.mjs";
|
|
200
206
|
import {
|
|
201
|
-
|
|
202
|
-
} from "./chunk-
|
|
207
|
+
drop
|
|
208
|
+
} from "./chunk-S3CORED5.mjs";
|
|
203
209
|
import {
|
|
204
210
|
dropRight
|
|
205
211
|
} from "./chunk-JEKUA56R.mjs";
|
|
@@ -214,16 +220,13 @@ import {
|
|
|
214
220
|
} from "./chunk-6KP7CLVJ.mjs";
|
|
215
221
|
import {
|
|
216
222
|
flatMap
|
|
217
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-UY76KTPE.mjs";
|
|
218
224
|
import {
|
|
219
225
|
flattenDeep
|
|
220
226
|
} from "./chunk-ML727RRJ.mjs";
|
|
221
227
|
import {
|
|
222
228
|
flatten
|
|
223
229
|
} from "./chunk-33MSBDC6.mjs";
|
|
224
|
-
import {
|
|
225
|
-
forEachRight
|
|
226
|
-
} from "./chunk-IEA53J7P.mjs";
|
|
227
230
|
import {
|
|
228
231
|
chunk
|
|
229
232
|
} from "./chunk-E6C5EZQA.mjs";
|
|
@@ -242,14 +245,14 @@ import {
|
|
|
242
245
|
import {
|
|
243
246
|
differenceWith
|
|
244
247
|
} from "./chunk-6NVQAHXP.mjs";
|
|
245
|
-
import {
|
|
246
|
-
drop
|
|
247
|
-
} from "./chunk-S3CORED5.mjs";
|
|
248
248
|
import "./chunk-FZEZH22H.mjs";
|
|
249
249
|
import {
|
|
250
250
|
AbortError
|
|
251
251
|
} from "./chunk-DXB7EZUQ.mjs";
|
|
252
252
|
import "./chunk-236H5JZJ.mjs";
|
|
253
|
+
import {
|
|
254
|
+
once
|
|
255
|
+
} from "./chunk-CMBC4MXG.mjs";
|
|
253
256
|
import {
|
|
254
257
|
throttle
|
|
255
258
|
} from "./chunk-QOJGMVVR.mjs";
|
|
@@ -262,9 +265,6 @@ import {
|
|
|
262
265
|
import {
|
|
263
266
|
noop
|
|
264
267
|
} from "./chunk-LKXCOLNY.mjs";
|
|
265
|
-
import {
|
|
266
|
-
once
|
|
267
|
-
} from "./chunk-CMBC4MXG.mjs";
|
|
268
268
|
import "./chunk-2MM5EJJX.mjs";
|
|
269
269
|
export {
|
|
270
270
|
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.240+d1e45482",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/flatMap.ts"],"sourcesContent":["import { flatten } from './flatten';\n\n/**\n * Maps each element in the array using the iteratee function and flattens the result up to the specified depth.\n *\n * @template T - The type of elements within the array.\n * @template U - The type of elements within the returned array from the iteratee function.\n * @template D - The depth to which the array should be flattened.\n * @param {T[]} arr - The array to flatten.\n * @param {(item: T) => U} iteratee - The function that produces the new array elements.\n * @param {D} depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1.\n * @returns {Array<FlatArray<U[], D>>} The new array with the mapped and flattened elements.\n *\n * @example\n * const arr = [1, 2, 3];\n *\n * flatMap(arr, (item: number) => [item, item]);\n * // [1, 1, 2, 2, 3, 3]\n *\n * flatMap(arr, (item: number) => [[item, item]], 2);\n * // [1, 1, 2, 2, 3, 3]\n */\nexport function flatMap<T, U, D extends number>(\n arr: readonly T[],\n iteratee: (item: T) => U,\n depth = 1 as D\n): Array<FlatArray<U[], D>> {\n return flatten(arr.map(item => iteratee(item)), depth);\n}\n"],"mappings":";;;;;AAsBO,SAAS,QACd,KACA,UACA,QAAQ,GACkB;AAC1B,SAAO,QAAQ,IAAI,IAAI,UAAQ,SAAS,IAAI,CAAC,GAAG,KAAK;AACvD;","names":[]}
|