es-toolkit 1.17.0-dev.521 → 1.17.0-dev.523
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/flatMapDeep.d.mts +18 -0
- package/dist/array/flatMapDeep.d.ts +18 -0
- package/dist/array/flatMapDeep.mjs +7 -0
- package/dist/array/flattenDeep.d.mts +1 -1
- package/dist/array/flattenDeep.d.ts +1 -1
- package/dist/array/index.d.mts +1 -0
- package/dist/array/index.d.ts +1 -0
- package/dist/array/index.js +542 -59
- package/dist/array/index.mjs +1 -0
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/index.d.mts +1 -0
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +59 -58
- package/dist/compat/index.mjs +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +56 -56
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
- package/dist/_chunk/initial-L_KfII.js +0 -537
package/dist/compat/index.d.mts
CHANGED
|
@@ -8,6 +8,7 @@ export { dropRight } from '../array/dropRight.mjs';
|
|
|
8
8
|
export { dropRightWhile } from '../array/dropRightWhile.mjs';
|
|
9
9
|
export { dropWhile } from '../array/dropWhile.mjs';
|
|
10
10
|
export { flatMap } from '../array/flatMap.mjs';
|
|
11
|
+
export { flatMapDeep } from '../array/flatMapDeep.mjs';
|
|
11
12
|
export { forEachRight } from '../array/forEachRight.mjs';
|
|
12
13
|
export { groupBy } from '../array/groupBy.mjs';
|
|
13
14
|
export { intersection } from '../array/intersection.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { dropRight } from '../array/dropRight.js';
|
|
|
8
8
|
export { dropRightWhile } from '../array/dropRightWhile.js';
|
|
9
9
|
export { dropWhile } from '../array/dropWhile.js';
|
|
10
10
|
export { flatMap } from '../array/flatMap.js';
|
|
11
|
+
export { flatMapDeep } from '../array/flatMapDeep.js';
|
|
11
12
|
export { forEachRight } from '../array/forEachRight.js';
|
|
12
13
|
export { groupBy } from '../array/groupBy.js';
|
|
13
14
|
export { intersection } from '../array/intersection.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const array_index = require('../array/index.js');
|
|
6
6
|
const promise_index = require('../_chunk/index-BGZDR9.js');
|
|
7
7
|
const rest$1 = require('../_chunk/rest-Bzm2XK.js');
|
|
8
8
|
const math_index = require('../math/index.js');
|
|
@@ -17,17 +17,17 @@ function chunk(arr, size = 1) {
|
|
|
17
17
|
if (size === 0) {
|
|
18
18
|
return [];
|
|
19
19
|
}
|
|
20
|
-
return
|
|
20
|
+
return array_index.chunk(arr, size);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function concat(...values) {
|
|
24
|
-
return
|
|
24
|
+
return array_index.flatten(values);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function difference(arr, ...values) {
|
|
28
28
|
const arr1 = arr;
|
|
29
|
-
const arr2 =
|
|
30
|
-
return
|
|
29
|
+
const arr2 = array_index.flatten(values);
|
|
30
|
+
return array_index.difference(arr1, arr2);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function fill(array, value, start = 0, end = array.length) {
|
|
@@ -39,7 +39,7 @@ function fill(array, value, start = 0, end = array.length) {
|
|
|
39
39
|
if (!end) {
|
|
40
40
|
end = 0;
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return array_index.fill(array, value, start, end);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const IS_PLAIN = /^\w*$/;
|
|
@@ -538,7 +538,7 @@ function set(obj, path, value) {
|
|
|
538
538
|
|
|
539
539
|
function zipObjectDeep(keys, values) {
|
|
540
540
|
const result = {};
|
|
541
|
-
const zipped =
|
|
541
|
+
const zipped = array_index.zip(keys, values);
|
|
542
542
|
for (let i = 0; i < zipped.length; i++) {
|
|
543
543
|
const [key, value] = zipped[i];
|
|
544
544
|
if (key != null) {
|
|
@@ -840,57 +840,58 @@ function min(items = []) {
|
|
|
840
840
|
return minElement;
|
|
841
841
|
}
|
|
842
842
|
|
|
843
|
-
exports.at =
|
|
844
|
-
exports.compact =
|
|
845
|
-
exports.countBy =
|
|
846
|
-
exports.differenceBy =
|
|
847
|
-
exports.differenceWith =
|
|
848
|
-
exports.drop =
|
|
849
|
-
exports.dropRight =
|
|
850
|
-
exports.dropRightWhile =
|
|
851
|
-
exports.dropWhile =
|
|
852
|
-
exports.first =
|
|
853
|
-
exports.flatMap =
|
|
854
|
-
exports.
|
|
855
|
-
exports.
|
|
856
|
-
exports.
|
|
857
|
-
exports.
|
|
858
|
-
exports.
|
|
859
|
-
exports.
|
|
860
|
-
exports.
|
|
861
|
-
exports.
|
|
862
|
-
exports.
|
|
863
|
-
exports.
|
|
864
|
-
exports.
|
|
865
|
-
exports.
|
|
866
|
-
exports.
|
|
867
|
-
exports.
|
|
868
|
-
exports.
|
|
869
|
-
exports.
|
|
870
|
-
exports.
|
|
871
|
-
exports.
|
|
872
|
-
exports.
|
|
873
|
-
exports.
|
|
874
|
-
exports.
|
|
875
|
-
exports.
|
|
876
|
-
exports.
|
|
877
|
-
exports.
|
|
878
|
-
exports.
|
|
879
|
-
exports.
|
|
880
|
-
exports.
|
|
881
|
-
exports.
|
|
882
|
-
exports.
|
|
883
|
-
exports.
|
|
884
|
-
exports.
|
|
885
|
-
exports.
|
|
886
|
-
exports.
|
|
887
|
-
exports.
|
|
888
|
-
exports.
|
|
889
|
-
exports.
|
|
890
|
-
exports.
|
|
891
|
-
exports.
|
|
892
|
-
exports.
|
|
893
|
-
exports.
|
|
843
|
+
exports.at = array_index.at;
|
|
844
|
+
exports.compact = array_index.compact;
|
|
845
|
+
exports.countBy = array_index.countBy;
|
|
846
|
+
exports.differenceBy = array_index.differenceBy;
|
|
847
|
+
exports.differenceWith = array_index.differenceWith;
|
|
848
|
+
exports.drop = array_index.drop;
|
|
849
|
+
exports.dropRight = array_index.dropRight;
|
|
850
|
+
exports.dropRightWhile = array_index.dropRightWhile;
|
|
851
|
+
exports.dropWhile = array_index.dropWhile;
|
|
852
|
+
exports.first = array_index.head;
|
|
853
|
+
exports.flatMap = array_index.flatMap;
|
|
854
|
+
exports.flatMapDeep = array_index.flatMapDeep;
|
|
855
|
+
exports.forEachRight = array_index.forEachRight;
|
|
856
|
+
exports.groupBy = array_index.groupBy;
|
|
857
|
+
exports.head = array_index.head;
|
|
858
|
+
exports.initial = array_index.initial;
|
|
859
|
+
exports.intersection = array_index.intersection;
|
|
860
|
+
exports.intersectionBy = array_index.intersectionBy;
|
|
861
|
+
exports.intersectionWith = array_index.intersectionWith;
|
|
862
|
+
exports.isSubset = array_index.isSubset;
|
|
863
|
+
exports.join = array_index.join;
|
|
864
|
+
exports.keyBy = array_index.keyBy;
|
|
865
|
+
exports.last = array_index.last;
|
|
866
|
+
exports.maxBy = array_index.maxBy;
|
|
867
|
+
exports.minBy = array_index.minBy;
|
|
868
|
+
exports.partition = array_index.partition;
|
|
869
|
+
exports.pullAt = array_index.pullAt;
|
|
870
|
+
exports.sample = array_index.sample;
|
|
871
|
+
exports.sampleSize = array_index.sampleSize;
|
|
872
|
+
exports.shuffle = array_index.shuffle;
|
|
873
|
+
exports.sortBy = array_index.sortBy;
|
|
874
|
+
exports.tail = array_index.tail;
|
|
875
|
+
exports.take = array_index.take;
|
|
876
|
+
exports.takeRight = array_index.takeRight;
|
|
877
|
+
exports.takeRightWhile = array_index.takeRightWhile;
|
|
878
|
+
exports.takeWhile = array_index.takeWhile;
|
|
879
|
+
exports.toFilled = array_index.toFilled;
|
|
880
|
+
exports.union = array_index.union;
|
|
881
|
+
exports.unionBy = array_index.unionBy;
|
|
882
|
+
exports.unionWith = array_index.unionWith;
|
|
883
|
+
exports.uniq = array_index.uniq;
|
|
884
|
+
exports.uniqBy = array_index.uniqBy;
|
|
885
|
+
exports.uniqWith = array_index.uniqWith;
|
|
886
|
+
exports.unzip = array_index.unzip;
|
|
887
|
+
exports.unzipWith = array_index.unzipWith;
|
|
888
|
+
exports.without = array_index.without;
|
|
889
|
+
exports.xor = array_index.xor;
|
|
890
|
+
exports.xorBy = array_index.xorBy;
|
|
891
|
+
exports.xorWith = array_index.xorWith;
|
|
892
|
+
exports.zip = array_index.zip;
|
|
893
|
+
exports.zipObject = array_index.zipObject;
|
|
894
|
+
exports.zipWith = array_index.zipWith;
|
|
894
895
|
exports.AbortError = promise_index.AbortError;
|
|
895
896
|
exports.TimeoutError = promise_index.TimeoutError;
|
|
896
897
|
exports.delay = promise_index.delay;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ export { dropRight } from '../array/dropRight.mjs';
|
|
|
8
8
|
export { dropRightWhile } from '../array/dropRightWhile.mjs';
|
|
9
9
|
export { dropWhile } from '../array/dropWhile.mjs';
|
|
10
10
|
export { flatMap } from '../array/flatMap.mjs';
|
|
11
|
+
export { flatMapDeep } from '../array/flatMapDeep.mjs';
|
|
11
12
|
export { forEachRight } from '../array/forEachRight.mjs';
|
|
12
13
|
export { groupBy } from '../array/groupBy.mjs';
|
|
13
14
|
export { intersection } from '../array/intersection.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -11,6 +11,7 @@ export { dropRightWhile } from './array/dropRightWhile.mjs';
|
|
|
11
11
|
export { dropWhile } from './array/dropWhile.mjs';
|
|
12
12
|
export { fill } from './array/fill.mjs';
|
|
13
13
|
export { flatMap } from './array/flatMap.mjs';
|
|
14
|
+
export { flatMapDeep } from './array/flatMapDeep.mjs';
|
|
14
15
|
export { flatten } from './array/flatten.mjs';
|
|
15
16
|
export { flattenDeep } from './array/flattenDeep.mjs';
|
|
16
17
|
export { forEachRight } from './array/forEachRight.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { dropRightWhile } from './array/dropRightWhile.js';
|
|
|
11
11
|
export { dropWhile } from './array/dropWhile.js';
|
|
12
12
|
export { fill } from './array/fill.js';
|
|
13
13
|
export { flatMap } from './array/flatMap.js';
|
|
14
|
+
export { flatMapDeep } from './array/flatMapDeep.js';
|
|
14
15
|
export { flatten } from './array/flatten.js';
|
|
15
16
|
export { flattenDeep } from './array/flattenDeep.js';
|
|
16
17
|
export { forEachRight } from './array/forEachRight.js';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const initial = require('./_chunk/initial-L_KfII.js');
|
|
6
5
|
const array_index = require('./array/index.js');
|
|
7
6
|
const promise_index = require('./_chunk/index-BGZDR9.js');
|
|
8
7
|
const rest = require('./_chunk/rest-Bzm2XK.js');
|
|
@@ -18,62 +17,63 @@ const string_index = require('./string/index.js');
|
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
exports.at =
|
|
22
|
-
exports.chunk =
|
|
23
|
-
exports.compact =
|
|
24
|
-
exports.countBy =
|
|
25
|
-
exports.difference =
|
|
26
|
-
exports.differenceBy =
|
|
27
|
-
exports.differenceWith =
|
|
28
|
-
exports.drop =
|
|
29
|
-
exports.dropRight =
|
|
30
|
-
exports.dropRightWhile =
|
|
31
|
-
exports.dropWhile =
|
|
32
|
-
exports.fill =
|
|
33
|
-
exports.flatMap =
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.groupBy = initial.groupBy;
|
|
37
|
-
exports.head = initial.head;
|
|
38
|
-
exports.initial = initial.initial;
|
|
39
|
-
exports.intersection = initial.intersection;
|
|
40
|
-
exports.intersectionBy = initial.intersectionBy;
|
|
41
|
-
exports.intersectionWith = initial.intersectionWith;
|
|
42
|
-
exports.isSubset = initial.isSubset;
|
|
43
|
-
exports.join = initial.join;
|
|
44
|
-
exports.keyBy = initial.keyBy;
|
|
45
|
-
exports.last = initial.last;
|
|
46
|
-
exports.maxBy = initial.maxBy;
|
|
47
|
-
exports.minBy = initial.minBy;
|
|
48
|
-
exports.orderBy = initial.orderBy;
|
|
49
|
-
exports.partition = initial.partition;
|
|
50
|
-
exports.pullAt = initial.pullAt;
|
|
51
|
-
exports.sample = initial.sample;
|
|
52
|
-
exports.sampleSize = initial.sampleSize;
|
|
53
|
-
exports.shuffle = initial.shuffle;
|
|
54
|
-
exports.sortBy = initial.sortBy;
|
|
55
|
-
exports.tail = initial.tail;
|
|
56
|
-
exports.take = initial.take;
|
|
57
|
-
exports.takeRight = initial.takeRight;
|
|
58
|
-
exports.takeRightWhile = initial.takeRightWhile;
|
|
59
|
-
exports.takeWhile = initial.takeWhile;
|
|
60
|
-
exports.toFilled = initial.toFilled;
|
|
61
|
-
exports.union = initial.union;
|
|
62
|
-
exports.unionBy = initial.unionBy;
|
|
63
|
-
exports.unionWith = initial.unionWith;
|
|
64
|
-
exports.uniq = initial.uniq;
|
|
65
|
-
exports.uniqBy = initial.uniqBy;
|
|
66
|
-
exports.uniqWith = initial.uniqWith;
|
|
67
|
-
exports.unzip = initial.unzip;
|
|
68
|
-
exports.unzipWith = initial.unzipWith;
|
|
69
|
-
exports.without = initial.without;
|
|
70
|
-
exports.xor = initial.xor;
|
|
71
|
-
exports.xorBy = initial.xorBy;
|
|
72
|
-
exports.xorWith = initial.xorWith;
|
|
73
|
-
exports.zip = initial.zip;
|
|
74
|
-
exports.zipObject = initial.zipObject;
|
|
75
|
-
exports.zipWith = initial.zipWith;
|
|
20
|
+
exports.at = array_index.at;
|
|
21
|
+
exports.chunk = array_index.chunk;
|
|
22
|
+
exports.compact = array_index.compact;
|
|
23
|
+
exports.countBy = array_index.countBy;
|
|
24
|
+
exports.difference = array_index.difference;
|
|
25
|
+
exports.differenceBy = array_index.differenceBy;
|
|
26
|
+
exports.differenceWith = array_index.differenceWith;
|
|
27
|
+
exports.drop = array_index.drop;
|
|
28
|
+
exports.dropRight = array_index.dropRight;
|
|
29
|
+
exports.dropRightWhile = array_index.dropRightWhile;
|
|
30
|
+
exports.dropWhile = array_index.dropWhile;
|
|
31
|
+
exports.fill = array_index.fill;
|
|
32
|
+
exports.flatMap = array_index.flatMap;
|
|
33
|
+
exports.flatMapDeep = array_index.flatMapDeep;
|
|
34
|
+
exports.flatten = array_index.flatten;
|
|
76
35
|
exports.flattenDeep = array_index.flattenDeep;
|
|
36
|
+
exports.forEachRight = array_index.forEachRight;
|
|
37
|
+
exports.groupBy = array_index.groupBy;
|
|
38
|
+
exports.head = array_index.head;
|
|
39
|
+
exports.initial = array_index.initial;
|
|
40
|
+
exports.intersection = array_index.intersection;
|
|
41
|
+
exports.intersectionBy = array_index.intersectionBy;
|
|
42
|
+
exports.intersectionWith = array_index.intersectionWith;
|
|
43
|
+
exports.isSubset = array_index.isSubset;
|
|
44
|
+
exports.join = array_index.join;
|
|
45
|
+
exports.keyBy = array_index.keyBy;
|
|
46
|
+
exports.last = array_index.last;
|
|
47
|
+
exports.maxBy = array_index.maxBy;
|
|
48
|
+
exports.minBy = array_index.minBy;
|
|
49
|
+
exports.orderBy = array_index.orderBy;
|
|
50
|
+
exports.partition = array_index.partition;
|
|
51
|
+
exports.pullAt = array_index.pullAt;
|
|
52
|
+
exports.sample = array_index.sample;
|
|
53
|
+
exports.sampleSize = array_index.sampleSize;
|
|
54
|
+
exports.shuffle = array_index.shuffle;
|
|
55
|
+
exports.sortBy = array_index.sortBy;
|
|
56
|
+
exports.tail = array_index.tail;
|
|
57
|
+
exports.take = array_index.take;
|
|
58
|
+
exports.takeRight = array_index.takeRight;
|
|
59
|
+
exports.takeRightWhile = array_index.takeRightWhile;
|
|
60
|
+
exports.takeWhile = array_index.takeWhile;
|
|
61
|
+
exports.toFilled = array_index.toFilled;
|
|
62
|
+
exports.union = array_index.union;
|
|
63
|
+
exports.unionBy = array_index.unionBy;
|
|
64
|
+
exports.unionWith = array_index.unionWith;
|
|
65
|
+
exports.uniq = array_index.uniq;
|
|
66
|
+
exports.uniqBy = array_index.uniqBy;
|
|
67
|
+
exports.uniqWith = array_index.uniqWith;
|
|
68
|
+
exports.unzip = array_index.unzip;
|
|
69
|
+
exports.unzipWith = array_index.unzipWith;
|
|
70
|
+
exports.without = array_index.without;
|
|
71
|
+
exports.xor = array_index.xor;
|
|
72
|
+
exports.xorBy = array_index.xorBy;
|
|
73
|
+
exports.xorWith = array_index.xorWith;
|
|
74
|
+
exports.zip = array_index.zip;
|
|
75
|
+
exports.zipObject = array_index.zipObject;
|
|
76
|
+
exports.zipWith = array_index.zipWith;
|
|
77
77
|
exports.AbortError = promise_index.AbortError;
|
|
78
78
|
exports.TimeoutError = promise_index.TimeoutError;
|
|
79
79
|
exports.delay = promise_index.delay;
|
package/dist/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ export { dropRightWhile } from './array/dropRightWhile.mjs';
|
|
|
11
11
|
export { dropWhile } from './array/dropWhile.mjs';
|
|
12
12
|
export { fill } from './array/fill.mjs';
|
|
13
13
|
export { flatMap } from './array/flatMap.mjs';
|
|
14
|
+
export { flatMapDeep } from './array/flatMapDeep.mjs';
|
|
14
15
|
export { flatten } from './array/flatten.mjs';
|
|
15
16
|
export { flattenDeep } from './array/flattenDeep.mjs';
|
|
16
17
|
export { forEachRight } from './array/forEachRight.mjs';
|
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.17.0-dev.
|
|
4
|
+
"version": "1.17.0-dev.523+7ad4ef15",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|