es-toolkit 1.2.1 → 1.2.2-dev.69
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/array/chunk.d.mts +1 -1
- package/dist/array/chunk.d.ts +1 -1
- package/dist/array/chunk.js.map +1 -1
- package/dist/array/chunk.mjs +1 -1
- package/dist/array/difference.d.mts +1 -1
- package/dist/array/difference.d.ts +1 -1
- package/dist/array/difference.js.map +1 -1
- package/dist/array/difference.mjs +1 -1
- package/dist/array/differenceBy.d.mts +1 -1
- package/dist/array/differenceBy.d.ts +1 -1
- package/dist/array/differenceBy.js.map +1 -1
- package/dist/array/differenceBy.mjs +1 -1
- package/dist/array/differenceWith.d.mts +1 -1
- package/dist/array/differenceWith.d.ts +1 -1
- package/dist/array/differenceWith.js.map +1 -1
- package/dist/array/differenceWith.mjs +1 -1
- package/dist/array/drop.d.mts +1 -1
- package/dist/array/drop.d.ts +1 -1
- package/dist/array/drop.js.map +1 -1
- package/dist/array/drop.mjs +1 -1
- package/dist/array/dropRight.d.mts +1 -1
- package/dist/array/dropRight.d.ts +1 -1
- package/dist/array/dropRight.js.map +1 -1
- package/dist/array/dropRight.mjs +1 -1
- package/dist/array/dropRightWhile.d.mts +1 -1
- package/dist/array/dropRightWhile.d.ts +1 -1
- package/dist/array/dropRightWhile.js.map +1 -1
- package/dist/array/dropRightWhile.mjs +2 -2
- package/dist/array/dropWhile.d.mts +1 -1
- package/dist/array/dropWhile.d.ts +1 -1
- package/dist/array/dropWhile.js.map +1 -1
- package/dist/array/dropWhile.mjs +1 -1
- package/dist/array/groupBy.d.mts +1 -1
- package/dist/array/groupBy.d.ts +1 -1
- package/dist/array/groupBy.js.map +1 -1
- package/dist/array/groupBy.mjs +1 -1
- package/dist/array/index.js +5 -14
- package/dist/array/index.js.map +1 -1
- package/dist/array/index.mjs +44 -44
- package/dist/array/intersection.d.mts +1 -1
- package/dist/array/intersection.d.ts +1 -1
- package/dist/array/intersection.js.map +1 -1
- package/dist/array/intersection.mjs +1 -1
- package/dist/array/intersectionBy.d.mts +1 -1
- package/dist/array/intersectionBy.d.ts +1 -1
- package/dist/array/intersectionBy.js +2 -4
- package/dist/array/intersectionBy.js.map +1 -1
- package/dist/array/intersectionBy.mjs +1 -1
- package/dist/array/intersectionWith.d.mts +1 -1
- package/dist/array/intersectionWith.d.ts +1 -1
- package/dist/array/intersectionWith.js.map +1 -1
- package/dist/array/intersectionWith.mjs +1 -1
- package/dist/array/partition.d.mts +1 -1
- package/dist/array/partition.d.ts +1 -1
- package/dist/array/partition.js.map +1 -1
- package/dist/array/partition.mjs +1 -1
- package/dist/array/sample.d.mts +1 -1
- package/dist/array/sample.d.ts +1 -1
- package/dist/array/sample.js.map +1 -1
- package/dist/array/sample.mjs +1 -1
- package/dist/array/shuffle.d.mts +1 -1
- package/dist/array/shuffle.d.ts +1 -1
- package/dist/array/shuffle.js.map +1 -1
- package/dist/array/shuffle.mjs +1 -1
- package/dist/array/take.d.mts +1 -1
- package/dist/array/take.d.ts +1 -1
- package/dist/array/take.js.map +1 -1
- package/dist/array/take.mjs +1 -1
- package/dist/array/takeRight.d.mts +1 -1
- package/dist/array/takeRight.d.ts +1 -1
- package/dist/array/takeRight.js.map +1 -1
- package/dist/array/takeRight.mjs +1 -1
- package/dist/array/takeRightWhile.d.mts +1 -1
- package/dist/array/takeRightWhile.d.ts +1 -1
- package/dist/array/takeRightWhile.js.map +1 -1
- package/dist/array/takeRightWhile.mjs +1 -1
- package/dist/array/takeWhile.d.mts +1 -1
- package/dist/array/takeWhile.d.ts +1 -1
- package/dist/array/takeWhile.js.map +1 -1
- package/dist/array/takeWhile.mjs +1 -1
- package/dist/array/union.d.mts +1 -1
- package/dist/array/union.d.ts +1 -1
- package/dist/array/union.js +1 -8
- package/dist/array/union.js.map +1 -1
- package/dist/array/union.mjs +2 -2
- package/dist/array/unionBy.d.mts +1 -1
- package/dist/array/unionBy.d.ts +1 -1
- package/dist/array/unionBy.js.map +1 -1
- package/dist/array/unionBy.mjs +1 -1
- package/dist/array/unionWith.d.mts +1 -1
- package/dist/array/unionWith.d.ts +1 -1
- package/dist/array/unionWith.js.map +1 -1
- package/dist/array/unionWith.mjs +2 -2
- package/dist/array/uniq.d.mts +1 -1
- package/dist/array/uniq.d.ts +1 -1
- package/dist/array/uniq.js +1 -8
- package/dist/array/uniq.js.map +1 -1
- package/dist/array/uniq.mjs +1 -1
- package/dist/array/uniqBy.d.mts +5 -6
- package/dist/array/uniqBy.d.ts +5 -6
- package/dist/array/uniqBy.js +2 -2
- package/dist/array/uniqBy.js.map +1 -1
- package/dist/array/uniqBy.mjs +2 -2
- package/dist/array/uniqWith.d.mts +3 -4
- package/dist/array/uniqWith.d.ts +3 -4
- package/dist/array/uniqWith.js.map +1 -1
- package/dist/array/uniqWith.mjs +1 -1
- package/dist/array/xor.d.mts +1 -1
- package/dist/array/xor.d.ts +1 -1
- package/dist/array/xor.js +1 -8
- package/dist/array/xor.js.map +1 -1
- package/dist/array/xor.mjs +5 -5
- package/dist/array/xorBy.d.mts +1 -1
- package/dist/array/xorBy.d.ts +1 -1
- package/dist/array/xorBy.js +2 -4
- package/dist/array/xorBy.js.map +1 -1
- package/dist/array/xorBy.mjs +4 -4
- package/dist/array/xorWith.d.mts +1 -1
- package/dist/array/xorWith.d.ts +1 -1
- package/dist/array/xorWith.js.map +1 -1
- package/dist/array/xorWith.mjs +5 -5
- package/dist/array/zip.d.mts +4 -4
- package/dist/array/zip.d.ts +4 -4
- package/dist/array/zip.js.map +1 -1
- package/dist/array/zip.mjs +1 -1
- package/dist/array/zipWith.d.mts +4 -4
- package/dist/array/zipWith.d.ts +4 -4
- package/dist/array/zipWith.js.map +1 -1
- package/dist/array/zipWith.mjs +1 -1
- package/dist/{chunk-LLOAPSQ6.mjs → chunk-2IXFGSUA.mjs} +1 -1
- package/dist/{chunk-LLOAPSQ6.mjs.map → chunk-2IXFGSUA.mjs.map} +1 -1
- package/dist/{chunk-DVRGUUQG.mjs → chunk-2PFDLYQC.mjs} +1 -1
- package/dist/chunk-2PFDLYQC.mjs.map +1 -0
- package/dist/{chunk-AB3DGGY3.mjs → chunk-3KHI4I2X.mjs} +2 -2
- package/dist/{chunk-AB3DGGY3.mjs.map → chunk-3KHI4I2X.mjs.map} +1 -1
- package/dist/{chunk-TF6N37OE.mjs → chunk-5L2V7WD3.mjs} +1 -1
- package/dist/{chunk-TF6N37OE.mjs.map → chunk-5L2V7WD3.mjs.map} +1 -1
- package/dist/{chunk-3GMXDQQQ.mjs → chunk-62EFHAYX.mjs} +4 -4
- package/dist/{chunk-3GMXDQQQ.mjs.map → chunk-62EFHAYX.mjs.map} +1 -1
- package/dist/{chunk-YNRYG5OB.mjs → chunk-7XTQCUMW.mjs} +1 -1
- package/dist/{chunk-YNRYG5OB.mjs.map → chunk-7XTQCUMW.mjs.map} +1 -1
- package/dist/{chunk-25R2U4KM.mjs → chunk-ACFP3XMB.mjs} +1 -1
- package/dist/{chunk-25R2U4KM.mjs.map → chunk-ACFP3XMB.mjs.map} +1 -1
- package/dist/chunk-ASFOKYTY.mjs +13 -0
- package/dist/chunk-ASFOKYTY.mjs.map +1 -0
- package/dist/{chunk-I2NAKQIE.mjs → chunk-DAJZ3JCI.mjs} +2 -2
- package/dist/{chunk-I2NAKQIE.mjs.map → chunk-DAJZ3JCI.mjs.map} +1 -1
- package/dist/{chunk-L25VRQ54.mjs → chunk-DD73BULA.mjs} +1 -1
- package/dist/chunk-DD73BULA.mjs.map +1 -0
- package/dist/{chunk-PHG5JCSW.mjs → chunk-DOOIIHT3.mjs} +1 -1
- package/dist/{chunk-PHG5JCSW.mjs.map → chunk-DOOIIHT3.mjs.map} +1 -1
- package/dist/{chunk-KPG3XQEN.mjs → chunk-DPLJQQFX.mjs} +1 -1
- package/dist/chunk-DPLJQQFX.mjs.map +1 -0
- package/dist/{chunk-OS5PZ4B4.mjs → chunk-E6C5EZQA.mjs} +1 -1
- package/dist/{chunk-OS5PZ4B4.mjs.map → chunk-E6C5EZQA.mjs.map} +1 -1
- package/dist/{chunk-VOAKEOIM.mjs → chunk-E7BJSLIX.mjs} +2 -2
- package/dist/{chunk-VOAKEOIM.mjs.map → chunk-E7BJSLIX.mjs.map} +1 -1
- package/dist/{chunk-MTT7OPUK.mjs → chunk-EW3RT4QW.mjs} +4 -4
- package/dist/{chunk-MTT7OPUK.mjs.map → chunk-EW3RT4QW.mjs.map} +1 -1
- package/dist/{chunk-S3ZF7ZPG.mjs → chunk-FCF2RHPW.mjs} +4 -4
- package/dist/{chunk-S3ZF7ZPG.mjs.map → chunk-FCF2RHPW.mjs.map} +1 -1
- package/dist/{chunk-5NSVMWDQ.mjs → chunk-FQ4K36VD.mjs} +1 -1
- package/dist/{chunk-5NSVMWDQ.mjs.map → chunk-FQ4K36VD.mjs.map} +1 -1
- package/dist/chunk-GNSJP2AB.mjs +10 -0
- package/dist/{chunk-ANJSX6WH.mjs.map → chunk-GNSJP2AB.mjs.map} +1 -1
- package/dist/{chunk-LIXL7PEP.mjs → chunk-JBDGK6X4.mjs} +1 -1
- package/dist/{chunk-LIXL7PEP.mjs.map → chunk-JBDGK6X4.mjs.map} +1 -1
- package/dist/{chunk-6Z2YFKXQ.mjs → chunk-KLJRZJOR.mjs} +1 -1
- package/dist/{chunk-6Z2YFKXQ.mjs.map → chunk-KLJRZJOR.mjs.map} +1 -1
- package/dist/{chunk-HK5OJANS.mjs → chunk-LVWX5B43.mjs} +1 -1
- package/dist/{chunk-HK5OJANS.mjs.map → chunk-LVWX5B43.mjs.map} +1 -1
- package/dist/{chunk-V6LXSPMF.mjs → chunk-LWXZFXY5.mjs} +1 -1
- package/dist/{chunk-V6LXSPMF.mjs.map → chunk-LWXZFXY5.mjs.map} +1 -1
- package/dist/{chunk-SORNYLIU.mjs → chunk-M7UI5ETO.mjs} +1 -1
- package/dist/{chunk-SORNYLIU.mjs.map → chunk-M7UI5ETO.mjs.map} +1 -1
- package/dist/{chunk-4RRRH7OY.mjs → chunk-ME352XO7.mjs} +1 -1
- package/dist/{chunk-4RRRH7OY.mjs.map → chunk-ME352XO7.mjs.map} +1 -1
- package/dist/{chunk-IFCX35BI.mjs → chunk-NTLX2MPV.mjs} +1 -1
- package/dist/{chunk-IFCX35BI.mjs.map → chunk-NTLX2MPV.mjs.map} +1 -1
- package/dist/{chunk-EXU45QAF.mjs → chunk-Q75KEFW5.mjs} +1 -1
- package/dist/{chunk-EXU45QAF.mjs.map → chunk-Q75KEFW5.mjs.map} +1 -1
- package/dist/{chunk-C4IZ7TGA.mjs → chunk-T5FDOBCA.mjs} +1 -1
- package/dist/chunk-T5FDOBCA.mjs.map +1 -0
- package/dist/{chunk-3PFYAKOD.mjs → chunk-VNMVP3DL.mjs} +1 -1
- package/dist/{chunk-3PFYAKOD.mjs.map → chunk-VNMVP3DL.mjs.map} +1 -1
- package/dist/{chunk-L3C6TG2V.mjs → chunk-XDKEPIUV.mjs} +1 -1
- package/dist/{chunk-L3C6TG2V.mjs.map → chunk-XDKEPIUV.mjs.map} +1 -1
- package/dist/chunk-XFCW7XJ4.mjs +9 -0
- package/dist/{chunk-SWPLMJR7.mjs.map → chunk-XFCW7XJ4.mjs.map} +1 -1
- package/dist/function/index.mjs +3 -3
- package/dist/index.js +5 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -73
- package/dist/object/index.mjs +6 -6
- package/package.json +1 -1
- package/dist/chunk-ANJSX6WH.mjs +0 -12
- package/dist/chunk-C4IZ7TGA.mjs.map +0 -1
- package/dist/chunk-DVRGUUQG.mjs.map +0 -1
- package/dist/chunk-JD42XAYW.mjs +0 -13
- package/dist/chunk-JD42XAYW.mjs.map +0 -1
- package/dist/chunk-KPG3XQEN.mjs.map +0 -1
- package/dist/chunk-L25VRQ54.mjs.map +0 -1
- package/dist/chunk-SWPLMJR7.mjs +0 -16
package/dist/index.mjs
CHANGED
|
@@ -2,16 +2,19 @@ import "./chunk-ARZ5BDR6.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
delay
|
|
4
4
|
} from "./chunk-ZBG3EYM3.mjs";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-T5JCRGXA.mjs";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
omit
|
|
8
|
+
} from "./chunk-PLTO44KM.mjs";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
omitBy
|
|
11
|
+
} from "./chunk-SF3V7XXM.mjs";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
pick
|
|
14
|
+
} from "./chunk-OFWKFUFZ.mjs";
|
|
15
|
+
import {
|
|
16
|
+
pickBy
|
|
17
|
+
} from "./chunk-T2C2WVFL.mjs";
|
|
15
18
|
import "./chunk-MAJSPFA6.mjs";
|
|
16
19
|
import {
|
|
17
20
|
isNotNil
|
|
@@ -25,123 +28,120 @@ import {
|
|
|
25
28
|
import {
|
|
26
29
|
isNil
|
|
27
30
|
} from "./chunk-OHQAR5AU.mjs";
|
|
28
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-IJLQVGW4.mjs";
|
|
29
32
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
clamp
|
|
34
|
+
} from "./chunk-MLCL773E.mjs";
|
|
32
35
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
round
|
|
37
|
+
} from "./chunk-V7E5DGZP.mjs";
|
|
35
38
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
39
|
+
sum
|
|
40
|
+
} from "./chunk-7OU22ENP.mjs";
|
|
41
|
+
import "./chunk-N6EM6ETS.mjs";
|
|
38
42
|
import {
|
|
39
|
-
|
|
40
|
-
} from "./chunk-
|
|
43
|
+
throttle
|
|
44
|
+
} from "./chunk-XLO3QZVY.mjs";
|
|
45
|
+
import {
|
|
46
|
+
debounce
|
|
47
|
+
} from "./chunk-GELVVASW.mjs";
|
|
48
|
+
import {
|
|
49
|
+
noop
|
|
50
|
+
} from "./chunk-LKXCOLNY.mjs";
|
|
51
|
+
import {
|
|
52
|
+
once
|
|
53
|
+
} from "./chunk-UFAA5WKR.mjs";
|
|
41
54
|
import "./chunk-EJGAXTF7.mjs";
|
|
55
|
+
import {
|
|
56
|
+
uniqBy
|
|
57
|
+
} from "./chunk-ASFOKYTY.mjs";
|
|
42
58
|
import {
|
|
43
59
|
xor
|
|
44
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-62EFHAYX.mjs";
|
|
45
61
|
import {
|
|
46
62
|
xorBy
|
|
47
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-EW3RT4QW.mjs";
|
|
48
64
|
import {
|
|
49
65
|
xorWith
|
|
50
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-FCF2RHPW.mjs";
|
|
51
67
|
import {
|
|
52
68
|
zip
|
|
53
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-DD73BULA.mjs";
|
|
54
70
|
import {
|
|
55
71
|
zipWith
|
|
56
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-T5FDOBCA.mjs";
|
|
73
|
+
import {
|
|
74
|
+
shuffle
|
|
75
|
+
} from "./chunk-DPLJQQFX.mjs";
|
|
76
|
+
import {
|
|
77
|
+
take
|
|
78
|
+
} from "./chunk-ME352XO7.mjs";
|
|
79
|
+
import {
|
|
80
|
+
takeRight
|
|
81
|
+
} from "./chunk-XDKEPIUV.mjs";
|
|
57
82
|
import {
|
|
58
83
|
takeRightWhile
|
|
59
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-NTLX2MPV.mjs";
|
|
60
85
|
import {
|
|
61
86
|
takeWhile
|
|
62
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-2IXFGSUA.mjs";
|
|
63
88
|
import {
|
|
64
89
|
union
|
|
65
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-DAJZ3JCI.mjs";
|
|
91
|
+
import {
|
|
92
|
+
uniq
|
|
93
|
+
} from "./chunk-XFCW7XJ4.mjs";
|
|
66
94
|
import {
|
|
67
95
|
unionBy
|
|
68
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-JBDGK6X4.mjs";
|
|
69
97
|
import {
|
|
70
98
|
unionWith
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
uniq
|
|
74
|
-
} from "./chunk-SWPLMJR7.mjs";
|
|
75
|
-
import {
|
|
76
|
-
uniqBy
|
|
77
|
-
} from "./chunk-JD42XAYW.mjs";
|
|
99
|
+
} from "./chunk-3KHI4I2X.mjs";
|
|
78
100
|
import {
|
|
79
101
|
uniqWith
|
|
80
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-2PFDLYQC.mjs";
|
|
103
|
+
import {
|
|
104
|
+
groupBy
|
|
105
|
+
} from "./chunk-LWXZFXY5.mjs";
|
|
81
106
|
import {
|
|
82
107
|
intersection
|
|
83
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-7XTQCUMW.mjs";
|
|
84
109
|
import {
|
|
85
110
|
intersectionBy
|
|
86
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-GNSJP2AB.mjs";
|
|
87
112
|
import {
|
|
88
113
|
intersectionWith
|
|
89
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-KLJRZJOR.mjs";
|
|
90
115
|
import {
|
|
91
116
|
partition
|
|
92
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-5L2V7WD3.mjs";
|
|
93
118
|
import {
|
|
94
119
|
sample
|
|
95
|
-
} from "./chunk-
|
|
96
|
-
import {
|
|
97
|
-
shuffle
|
|
98
|
-
} from "./chunk-KPG3XQEN.mjs";
|
|
120
|
+
} from "./chunk-DOOIIHT3.mjs";
|
|
99
121
|
import {
|
|
100
|
-
|
|
101
|
-
} from "./chunk-
|
|
122
|
+
chunk
|
|
123
|
+
} from "./chunk-E6C5EZQA.mjs";
|
|
102
124
|
import {
|
|
103
|
-
|
|
104
|
-
} from "./chunk-
|
|
125
|
+
difference
|
|
126
|
+
} from "./chunk-M7UI5ETO.mjs";
|
|
105
127
|
import {
|
|
106
128
|
differenceBy
|
|
107
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-LVWX5B43.mjs";
|
|
108
130
|
import {
|
|
109
131
|
differenceWith
|
|
110
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-FQ4K36VD.mjs";
|
|
111
133
|
import {
|
|
112
134
|
drop
|
|
113
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-ACFP3XMB.mjs";
|
|
114
136
|
import {
|
|
115
137
|
dropRight
|
|
116
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-Q75KEFW5.mjs";
|
|
117
139
|
import {
|
|
118
140
|
dropRightWhile
|
|
119
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-E7BJSLIX.mjs";
|
|
120
142
|
import {
|
|
121
143
|
dropWhile
|
|
122
|
-
} from "./chunk-
|
|
123
|
-
import {
|
|
124
|
-
groupBy
|
|
125
|
-
} from "./chunk-V6LXSPMF.mjs";
|
|
126
|
-
import "./chunk-N6EM6ETS.mjs";
|
|
127
|
-
import {
|
|
128
|
-
debounce
|
|
129
|
-
} from "./chunk-GELVVASW.mjs";
|
|
130
|
-
import {
|
|
131
|
-
noop
|
|
132
|
-
} from "./chunk-LKXCOLNY.mjs";
|
|
133
|
-
import {
|
|
134
|
-
once
|
|
135
|
-
} from "./chunk-UFAA5WKR.mjs";
|
|
136
|
-
import {
|
|
137
|
-
throttle
|
|
138
|
-
} from "./chunk-XLO3QZVY.mjs";
|
|
139
|
-
import {
|
|
140
|
-
chunk
|
|
141
|
-
} from "./chunk-OS5PZ4B4.mjs";
|
|
142
|
-
import {
|
|
143
|
-
difference
|
|
144
|
-
} from "./chunk-SORNYLIU.mjs";
|
|
144
|
+
} from "./chunk-VNMVP3DL.mjs";
|
|
145
145
|
import "./chunk-2MM5EJJX.mjs";
|
|
146
146
|
export {
|
|
147
147
|
chunk,
|
package/dist/object/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../chunk-T5JCRGXA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
pick
|
|
4
|
-
} from "../chunk-OFWKFUFZ.mjs";
|
|
5
|
-
import {
|
|
6
|
-
pickBy
|
|
7
|
-
} from "../chunk-T2C2WVFL.mjs";
|
|
8
2
|
import {
|
|
9
3
|
omit
|
|
10
4
|
} from "../chunk-PLTO44KM.mjs";
|
|
11
5
|
import {
|
|
12
6
|
omitBy
|
|
13
7
|
} from "../chunk-SF3V7XXM.mjs";
|
|
8
|
+
import {
|
|
9
|
+
pick
|
|
10
|
+
} from "../chunk-OFWKFUFZ.mjs";
|
|
11
|
+
import {
|
|
12
|
+
pickBy
|
|
13
|
+
} from "../chunk-T2C2WVFL.mjs";
|
|
14
14
|
import "../chunk-2MM5EJJX.mjs";
|
|
15
15
|
export {
|
|
16
16
|
omit,
|
package/package.json
CHANGED
package/dist/chunk-ANJSX6WH.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/array/intersectionBy.ts
|
|
2
|
-
function intersectionBy(firstArr, secondArr, mapper) {
|
|
3
|
-
const mappedSecondArr = secondArr.map((x) => mapper(x));
|
|
4
|
-
return firstArr.filter((item) => {
|
|
5
|
-
return mappedSecondArr.includes(mapper(item));
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
intersectionBy
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=chunk-ANJSX6WH.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/zipWith.ts"],"sourcesContent":["/**\n * Combines multiple arrays into a single array using a custom combiner function.\n *\n * This function takes multiple arrays and a combiner function, and returns a new array where each element\n * is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @param {T[]} arr1 - The first array to zip.\n * @param {U[]} [arr2] - The second array to zip (optional).\n * @param {V[]} [arr3] - The third array to zip (optional).\n * @param {W[]} [arr4] - The fourth array to zip (optional).\n * @param {(...items: T[]) => R} combine - The combiner function that takes corresponding elements from each array and returns a single value.\n * @returns {R[]} A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays.\n *\n * @example\n * // Example usage with two arrays:\n * const arr1 = [1, 2, 3];\n * const arr2 = [4, 5, 6];\n * const result = zipWith(arr1, arr2, (a, b) => a + b);\n * // result will be [5, 7, 9]\n *\n * @example\n * // Example usage with three arrays:\n * const arr1 = [1, 2];\n * const arr2 = [3, 4];\n * const arr3 = [5, 6];\n * const result = zipWith(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);\n * // result will be [`135`, `246`]\n */\nexport function zipWith<T, R>(arr1: T[], combine: (item: T) => R): R[];\nexport function zipWith<T, U, R>(arr1: T[], arr2: U[], combine: (item1: T, item2: U) => R): R[];\nexport function zipWith<T, U, V, R>(arr1: T[], arr2: U[], arr3: V[], combine: (item1: T, item2: U, item3: V) => R): R[];\nexport function zipWith<T, U, V, W, R>(\n arr1: T[],\n arr2: U[],\n arr3: V[],\n arr4: W[],\n combine: (item1: T, item2: U, item3: V, item4: W) => R\n): R[];\nexport function zipWith<T, R>(arr1: T[], ...rest: any[]): R[] {\n const arrs = [arr1, ...rest.slice(0, -1)];\n const combine = rest[rest.length - 1] as (...items: T[]) => R;\n\n const result: R[] = [];\n const maxIndex = Math.max(...arrs.map(arr => arr.length));\n\n for (let i = 0; i < maxIndex; i++) {\n const elements: T[] = arrs.map(arr => arr[i]);\n result.push(combine(...elements));\n }\n\n return result;\n}\n"],"mappings":";AAsCO,SAAS,QAAc,SAAc,MAAkB;AAC5D,QAAM,OAAO,CAAC,MAAM,GAAG,KAAK,MAAM,GAAG,EAAE,CAAC;AACxC,QAAM,UAAU,KAAK,KAAK,SAAS,CAAC;AAEpC,QAAM,SAAc,CAAC;AACrB,QAAM,WAAW,KAAK,IAAI,GAAG,KAAK,IAAI,SAAO,IAAI,MAAM,CAAC;AAExD,WAAS,IAAI,GAAG,IAAI,UAAU,KAAK;AACjC,UAAM,WAAgB,KAAK,IAAI,SAAO,IAAI,CAAC,CAAC;AAC5C,WAAO,KAAK,QAAQ,GAAG,QAAQ,CAAC;AAAA,EAClC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/uniqWith.ts"],"sourcesContent":["/**\n * The `uniqWith` function takes an array as its first argument and a 'comparator' function as the second.\n *\n * It evaluates the elements of the array using the comparator function, and if true is returned, it considers those elements as duplicates and removes them.\n *\n * @param {T[]} arr - The array to process.\n * @param {(item1: T, item2: T) => boolean} areItemsEqual - The function used to compare the array elements.\n * @returns {T[]} A new array containing only the unique elements from the original array, based on the values returned by the comparator function.\n *\n * @example\n * ```ts\n * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);\n * // [1.2, 3.2, 5.7, 7.19]\n * ```\n */\nexport function uniqWith<T>(arr: T[], areItemsEqual: (item1: T, item2: T) => boolean): T[] {\n const result: T[] = [];\n\n for (const item of arr) {\n const isUniq = result.every(v => !areItemsEqual(v, item));\n\n if (isUniq) {\n result.push(item);\n }\n }\n\n return result;\n}\n"],"mappings":";AAeO,SAAS,SAAY,KAAU,eAAqD;AACzF,QAAM,SAAc,CAAC;AAErB,aAAW,QAAQ,KAAK;AACtB,UAAM,SAAS,OAAO,MAAM,OAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAExD,QAAI,QAAQ;AACV,aAAO,KAAK,IAAI;AAAA,IAClB;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-JD42XAYW.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
uniqWith
|
|
3
|
-
} from "./chunk-DVRGUUQG.mjs";
|
|
4
|
-
|
|
5
|
-
// src/array/uniqBy.ts
|
|
6
|
-
function uniqBy(arr, converter) {
|
|
7
|
-
return uniqWith(arr, (item1, item2) => converter(item1) === converter(item2));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
uniqBy
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=chunk-JD42XAYW.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/uniqBy.ts"],"sourcesContent":["import { uniqWith } from './uniqWith';\n\n/**\n * The `uniqBy` function takes an array as its first argument and a 'converter' function as the second. It maps the array elements using the converter function, then removes any duplicates.\n *\n * It filters out elements with the same value, meaning it does not check for duplicates in data types like Objects.\n *\n * @param {T[]} arr - The array to process.\n * @param {(item: T) => U} converter - The function used to convert the array elements.\n * @returns {T[]} A new array containing only the unique elements from the original array, based on the values returned by the converter function.\n *\n * @example\n * ```ts\n * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor);\n * // [1.2, 2.1, 3.3, 5.7, 7.19]\n * ```\n */\nexport function uniqBy<T, U>(arr: T[], converter: (item: T) => U): T[] {\n return uniqWith(arr, (item1, item2) => converter(item1) === converter(item2));\n}\n"],"mappings":";;;;;AAiBO,SAAS,OAAa,KAAU,WAAgC;AACrE,SAAO,SAAS,KAAK,CAAC,OAAO,UAAU,UAAU,KAAK,MAAM,UAAU,KAAK,CAAC;AAC9E;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/shuffle.ts"],"sourcesContent":["/**\n * Randomizes the order of elements in an array using the Fisher-Yates algorithm.\n *\n * This function takes an array and returns a new array with its elements shuffled in a random order.\n *\n * @param {T[]} arr - The array to shuffle.\n * @returns {T[]} A new array with its elements shuffled in random order.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const shuffledArray = shuffle(array);\n * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2]\n */\nexport function shuffle<T>(arr: T[]): T[] {\n const result = arr.slice();\n\n /**\n * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm\n */\n for (let i = result.length - 1; i >= 1; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n\n return result;\n}\n"],"mappings":";AAaO,SAAS,QAAW,KAAe;AACxC,QAAM,SAAS,IAAI,MAAM;AAKzB,WAAS,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK;AAC3C,UAAM,IAAI,KAAK,MAAM,KAAK,OAAO,KAAK,IAAI,EAAE;AAC5C,KAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAAA,EAChD;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/array/zip.ts"],"sourcesContent":["/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @param {...T[][]} arrs - The arrays to zip together.\n * @returns {T[][]} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zip(arr1, arr2);\n * // result will be [[1, 'a'], [2, 'b'], [3, 'c']]\n *\n * const arr3 = [true, false];\n * const result2 = zip(arr1, arr2, arr3);\n * // result2 will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n */\nexport function zip<T>(arr1: T[]): Array<[T]>;\nexport function zip<T, U>(arr1: T[], arr2: U[]): Array<[T, U]>;\nexport function zip<T, U, V>(arr1: T[], arr2: U[], arr3: V[]): Array<[T, U, V]>;\nexport function zip<T, U, V, W>(arr1: T[], arr2: U[], arr3: V[], arr4: W[]): Array<[T, U, V, W]>;\nexport function zip<T>(...arrs: T[][]): T[][] {\n const result: T[][] = [];\n\n const maxIndex = Math.max(...arrs.map(x => x.length));\n\n for (let i = 0; i < maxIndex; i++) {\n const element: T[] = [];\n\n for (const arr of arrs) {\n element.push(arr[i]);\n }\n\n result.push(element);\n }\n\n return result;\n}\n"],"mappings":";AAyBO,SAAS,OAAU,MAAoB;AAC5C,QAAM,SAAgB,CAAC;AAEvB,QAAM,WAAW,KAAK,IAAI,GAAG,KAAK,IAAI,OAAK,EAAE,MAAM,CAAC;AAEpD,WAAS,IAAI,GAAG,IAAI,UAAU,KAAK;AACjC,UAAM,UAAe,CAAC;AAEtB,eAAW,OAAO,MAAM;AACtB,cAAQ,KAAK,IAAI,CAAC,CAAC;AAAA,IACrB;AAEA,WAAO,KAAK,OAAO;AAAA,EACrB;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-SWPLMJR7.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/array/uniq.ts
|
|
2
|
-
function uniq(arr) {
|
|
3
|
-
const result = [];
|
|
4
|
-
for (const item of arr) {
|
|
5
|
-
if (result.includes(item)) {
|
|
6
|
-
continue;
|
|
7
|
-
}
|
|
8
|
-
result.push(item);
|
|
9
|
-
}
|
|
10
|
-
return result;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
uniq
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-SWPLMJR7.mjs.map
|