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.
Files changed (205) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/array/chunk.d.mts +1 -1
  4. package/dist/array/chunk.d.ts +1 -1
  5. package/dist/array/chunk.js.map +1 -1
  6. package/dist/array/chunk.mjs +1 -1
  7. package/dist/array/difference.d.mts +1 -1
  8. package/dist/array/difference.d.ts +1 -1
  9. package/dist/array/difference.js.map +1 -1
  10. package/dist/array/difference.mjs +1 -1
  11. package/dist/array/differenceBy.d.mts +1 -1
  12. package/dist/array/differenceBy.d.ts +1 -1
  13. package/dist/array/differenceBy.js.map +1 -1
  14. package/dist/array/differenceBy.mjs +1 -1
  15. package/dist/array/differenceWith.d.mts +1 -1
  16. package/dist/array/differenceWith.d.ts +1 -1
  17. package/dist/array/differenceWith.js.map +1 -1
  18. package/dist/array/differenceWith.mjs +1 -1
  19. package/dist/array/drop.d.mts +1 -1
  20. package/dist/array/drop.d.ts +1 -1
  21. package/dist/array/drop.js.map +1 -1
  22. package/dist/array/drop.mjs +1 -1
  23. package/dist/array/dropRight.d.mts +1 -1
  24. package/dist/array/dropRight.d.ts +1 -1
  25. package/dist/array/dropRight.js.map +1 -1
  26. package/dist/array/dropRight.mjs +1 -1
  27. package/dist/array/dropRightWhile.d.mts +1 -1
  28. package/dist/array/dropRightWhile.d.ts +1 -1
  29. package/dist/array/dropRightWhile.js.map +1 -1
  30. package/dist/array/dropRightWhile.mjs +2 -2
  31. package/dist/array/dropWhile.d.mts +1 -1
  32. package/dist/array/dropWhile.d.ts +1 -1
  33. package/dist/array/dropWhile.js.map +1 -1
  34. package/dist/array/dropWhile.mjs +1 -1
  35. package/dist/array/groupBy.d.mts +1 -1
  36. package/dist/array/groupBy.d.ts +1 -1
  37. package/dist/array/groupBy.js.map +1 -1
  38. package/dist/array/groupBy.mjs +1 -1
  39. package/dist/array/index.js +5 -14
  40. package/dist/array/index.js.map +1 -1
  41. package/dist/array/index.mjs +44 -44
  42. package/dist/array/intersection.d.mts +1 -1
  43. package/dist/array/intersection.d.ts +1 -1
  44. package/dist/array/intersection.js.map +1 -1
  45. package/dist/array/intersection.mjs +1 -1
  46. package/dist/array/intersectionBy.d.mts +1 -1
  47. package/dist/array/intersectionBy.d.ts +1 -1
  48. package/dist/array/intersectionBy.js +2 -4
  49. package/dist/array/intersectionBy.js.map +1 -1
  50. package/dist/array/intersectionBy.mjs +1 -1
  51. package/dist/array/intersectionWith.d.mts +1 -1
  52. package/dist/array/intersectionWith.d.ts +1 -1
  53. package/dist/array/intersectionWith.js.map +1 -1
  54. package/dist/array/intersectionWith.mjs +1 -1
  55. package/dist/array/partition.d.mts +1 -1
  56. package/dist/array/partition.d.ts +1 -1
  57. package/dist/array/partition.js.map +1 -1
  58. package/dist/array/partition.mjs +1 -1
  59. package/dist/array/sample.d.mts +1 -1
  60. package/dist/array/sample.d.ts +1 -1
  61. package/dist/array/sample.js.map +1 -1
  62. package/dist/array/sample.mjs +1 -1
  63. package/dist/array/shuffle.d.mts +1 -1
  64. package/dist/array/shuffle.d.ts +1 -1
  65. package/dist/array/shuffle.js.map +1 -1
  66. package/dist/array/shuffle.mjs +1 -1
  67. package/dist/array/take.d.mts +1 -1
  68. package/dist/array/take.d.ts +1 -1
  69. package/dist/array/take.js.map +1 -1
  70. package/dist/array/take.mjs +1 -1
  71. package/dist/array/takeRight.d.mts +1 -1
  72. package/dist/array/takeRight.d.ts +1 -1
  73. package/dist/array/takeRight.js.map +1 -1
  74. package/dist/array/takeRight.mjs +1 -1
  75. package/dist/array/takeRightWhile.d.mts +1 -1
  76. package/dist/array/takeRightWhile.d.ts +1 -1
  77. package/dist/array/takeRightWhile.js.map +1 -1
  78. package/dist/array/takeRightWhile.mjs +1 -1
  79. package/dist/array/takeWhile.d.mts +1 -1
  80. package/dist/array/takeWhile.d.ts +1 -1
  81. package/dist/array/takeWhile.js.map +1 -1
  82. package/dist/array/takeWhile.mjs +1 -1
  83. package/dist/array/union.d.mts +1 -1
  84. package/dist/array/union.d.ts +1 -1
  85. package/dist/array/union.js +1 -8
  86. package/dist/array/union.js.map +1 -1
  87. package/dist/array/union.mjs +2 -2
  88. package/dist/array/unionBy.d.mts +1 -1
  89. package/dist/array/unionBy.d.ts +1 -1
  90. package/dist/array/unionBy.js.map +1 -1
  91. package/dist/array/unionBy.mjs +1 -1
  92. package/dist/array/unionWith.d.mts +1 -1
  93. package/dist/array/unionWith.d.ts +1 -1
  94. package/dist/array/unionWith.js.map +1 -1
  95. package/dist/array/unionWith.mjs +2 -2
  96. package/dist/array/uniq.d.mts +1 -1
  97. package/dist/array/uniq.d.ts +1 -1
  98. package/dist/array/uniq.js +1 -8
  99. package/dist/array/uniq.js.map +1 -1
  100. package/dist/array/uniq.mjs +1 -1
  101. package/dist/array/uniqBy.d.mts +5 -6
  102. package/dist/array/uniqBy.d.ts +5 -6
  103. package/dist/array/uniqBy.js +2 -2
  104. package/dist/array/uniqBy.js.map +1 -1
  105. package/dist/array/uniqBy.mjs +2 -2
  106. package/dist/array/uniqWith.d.mts +3 -4
  107. package/dist/array/uniqWith.d.ts +3 -4
  108. package/dist/array/uniqWith.js.map +1 -1
  109. package/dist/array/uniqWith.mjs +1 -1
  110. package/dist/array/xor.d.mts +1 -1
  111. package/dist/array/xor.d.ts +1 -1
  112. package/dist/array/xor.js +1 -8
  113. package/dist/array/xor.js.map +1 -1
  114. package/dist/array/xor.mjs +5 -5
  115. package/dist/array/xorBy.d.mts +1 -1
  116. package/dist/array/xorBy.d.ts +1 -1
  117. package/dist/array/xorBy.js +2 -4
  118. package/dist/array/xorBy.js.map +1 -1
  119. package/dist/array/xorBy.mjs +4 -4
  120. package/dist/array/xorWith.d.mts +1 -1
  121. package/dist/array/xorWith.d.ts +1 -1
  122. package/dist/array/xorWith.js.map +1 -1
  123. package/dist/array/xorWith.mjs +5 -5
  124. package/dist/array/zip.d.mts +4 -4
  125. package/dist/array/zip.d.ts +4 -4
  126. package/dist/array/zip.js.map +1 -1
  127. package/dist/array/zip.mjs +1 -1
  128. package/dist/array/zipWith.d.mts +4 -4
  129. package/dist/array/zipWith.d.ts +4 -4
  130. package/dist/array/zipWith.js.map +1 -1
  131. package/dist/array/zipWith.mjs +1 -1
  132. package/dist/{chunk-LLOAPSQ6.mjs → chunk-2IXFGSUA.mjs} +1 -1
  133. package/dist/{chunk-LLOAPSQ6.mjs.map → chunk-2IXFGSUA.mjs.map} +1 -1
  134. package/dist/{chunk-DVRGUUQG.mjs → chunk-2PFDLYQC.mjs} +1 -1
  135. package/dist/chunk-2PFDLYQC.mjs.map +1 -0
  136. package/dist/{chunk-AB3DGGY3.mjs → chunk-3KHI4I2X.mjs} +2 -2
  137. package/dist/{chunk-AB3DGGY3.mjs.map → chunk-3KHI4I2X.mjs.map} +1 -1
  138. package/dist/{chunk-TF6N37OE.mjs → chunk-5L2V7WD3.mjs} +1 -1
  139. package/dist/{chunk-TF6N37OE.mjs.map → chunk-5L2V7WD3.mjs.map} +1 -1
  140. package/dist/{chunk-3GMXDQQQ.mjs → chunk-62EFHAYX.mjs} +4 -4
  141. package/dist/{chunk-3GMXDQQQ.mjs.map → chunk-62EFHAYX.mjs.map} +1 -1
  142. package/dist/{chunk-YNRYG5OB.mjs → chunk-7XTQCUMW.mjs} +1 -1
  143. package/dist/{chunk-YNRYG5OB.mjs.map → chunk-7XTQCUMW.mjs.map} +1 -1
  144. package/dist/{chunk-25R2U4KM.mjs → chunk-ACFP3XMB.mjs} +1 -1
  145. package/dist/{chunk-25R2U4KM.mjs.map → chunk-ACFP3XMB.mjs.map} +1 -1
  146. package/dist/chunk-ASFOKYTY.mjs +13 -0
  147. package/dist/chunk-ASFOKYTY.mjs.map +1 -0
  148. package/dist/{chunk-I2NAKQIE.mjs → chunk-DAJZ3JCI.mjs} +2 -2
  149. package/dist/{chunk-I2NAKQIE.mjs.map → chunk-DAJZ3JCI.mjs.map} +1 -1
  150. package/dist/{chunk-L25VRQ54.mjs → chunk-DD73BULA.mjs} +1 -1
  151. package/dist/chunk-DD73BULA.mjs.map +1 -0
  152. package/dist/{chunk-PHG5JCSW.mjs → chunk-DOOIIHT3.mjs} +1 -1
  153. package/dist/{chunk-PHG5JCSW.mjs.map → chunk-DOOIIHT3.mjs.map} +1 -1
  154. package/dist/{chunk-KPG3XQEN.mjs → chunk-DPLJQQFX.mjs} +1 -1
  155. package/dist/chunk-DPLJQQFX.mjs.map +1 -0
  156. package/dist/{chunk-OS5PZ4B4.mjs → chunk-E6C5EZQA.mjs} +1 -1
  157. package/dist/{chunk-OS5PZ4B4.mjs.map → chunk-E6C5EZQA.mjs.map} +1 -1
  158. package/dist/{chunk-VOAKEOIM.mjs → chunk-E7BJSLIX.mjs} +2 -2
  159. package/dist/{chunk-VOAKEOIM.mjs.map → chunk-E7BJSLIX.mjs.map} +1 -1
  160. package/dist/{chunk-MTT7OPUK.mjs → chunk-EW3RT4QW.mjs} +4 -4
  161. package/dist/{chunk-MTT7OPUK.mjs.map → chunk-EW3RT4QW.mjs.map} +1 -1
  162. package/dist/{chunk-S3ZF7ZPG.mjs → chunk-FCF2RHPW.mjs} +4 -4
  163. package/dist/{chunk-S3ZF7ZPG.mjs.map → chunk-FCF2RHPW.mjs.map} +1 -1
  164. package/dist/{chunk-5NSVMWDQ.mjs → chunk-FQ4K36VD.mjs} +1 -1
  165. package/dist/{chunk-5NSVMWDQ.mjs.map → chunk-FQ4K36VD.mjs.map} +1 -1
  166. package/dist/chunk-GNSJP2AB.mjs +10 -0
  167. package/dist/{chunk-ANJSX6WH.mjs.map → chunk-GNSJP2AB.mjs.map} +1 -1
  168. package/dist/{chunk-LIXL7PEP.mjs → chunk-JBDGK6X4.mjs} +1 -1
  169. package/dist/{chunk-LIXL7PEP.mjs.map → chunk-JBDGK6X4.mjs.map} +1 -1
  170. package/dist/{chunk-6Z2YFKXQ.mjs → chunk-KLJRZJOR.mjs} +1 -1
  171. package/dist/{chunk-6Z2YFKXQ.mjs.map → chunk-KLJRZJOR.mjs.map} +1 -1
  172. package/dist/{chunk-HK5OJANS.mjs → chunk-LVWX5B43.mjs} +1 -1
  173. package/dist/{chunk-HK5OJANS.mjs.map → chunk-LVWX5B43.mjs.map} +1 -1
  174. package/dist/{chunk-V6LXSPMF.mjs → chunk-LWXZFXY5.mjs} +1 -1
  175. package/dist/{chunk-V6LXSPMF.mjs.map → chunk-LWXZFXY5.mjs.map} +1 -1
  176. package/dist/{chunk-SORNYLIU.mjs → chunk-M7UI5ETO.mjs} +1 -1
  177. package/dist/{chunk-SORNYLIU.mjs.map → chunk-M7UI5ETO.mjs.map} +1 -1
  178. package/dist/{chunk-4RRRH7OY.mjs → chunk-ME352XO7.mjs} +1 -1
  179. package/dist/{chunk-4RRRH7OY.mjs.map → chunk-ME352XO7.mjs.map} +1 -1
  180. package/dist/{chunk-IFCX35BI.mjs → chunk-NTLX2MPV.mjs} +1 -1
  181. package/dist/{chunk-IFCX35BI.mjs.map → chunk-NTLX2MPV.mjs.map} +1 -1
  182. package/dist/{chunk-EXU45QAF.mjs → chunk-Q75KEFW5.mjs} +1 -1
  183. package/dist/{chunk-EXU45QAF.mjs.map → chunk-Q75KEFW5.mjs.map} +1 -1
  184. package/dist/{chunk-C4IZ7TGA.mjs → chunk-T5FDOBCA.mjs} +1 -1
  185. package/dist/chunk-T5FDOBCA.mjs.map +1 -0
  186. package/dist/{chunk-3PFYAKOD.mjs → chunk-VNMVP3DL.mjs} +1 -1
  187. package/dist/{chunk-3PFYAKOD.mjs.map → chunk-VNMVP3DL.mjs.map} +1 -1
  188. package/dist/{chunk-L3C6TG2V.mjs → chunk-XDKEPIUV.mjs} +1 -1
  189. package/dist/{chunk-L3C6TG2V.mjs.map → chunk-XDKEPIUV.mjs.map} +1 -1
  190. package/dist/chunk-XFCW7XJ4.mjs +9 -0
  191. package/dist/{chunk-SWPLMJR7.mjs.map → chunk-XFCW7XJ4.mjs.map} +1 -1
  192. package/dist/function/index.mjs +3 -3
  193. package/dist/index.js +5 -14
  194. package/dist/index.js.map +1 -1
  195. package/dist/index.mjs +73 -73
  196. package/dist/object/index.mjs +6 -6
  197. package/package.json +1 -1
  198. package/dist/chunk-ANJSX6WH.mjs +0 -12
  199. package/dist/chunk-C4IZ7TGA.mjs.map +0 -1
  200. package/dist/chunk-DVRGUUQG.mjs.map +0 -1
  201. package/dist/chunk-JD42XAYW.mjs +0 -13
  202. package/dist/chunk-JD42XAYW.mjs.map +0 -1
  203. package/dist/chunk-KPG3XQEN.mjs.map +0 -1
  204. package/dist/chunk-L25VRQ54.mjs.map +0 -1
  205. 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-IJLQVGW4.mjs";
5
+ import "./chunk-T5JCRGXA.mjs";
6
6
  import {
7
- clamp
8
- } from "./chunk-MLCL773E.mjs";
7
+ omit
8
+ } from "./chunk-PLTO44KM.mjs";
9
9
  import {
10
- round
11
- } from "./chunk-V7E5DGZP.mjs";
10
+ omitBy
11
+ } from "./chunk-SF3V7XXM.mjs";
12
12
  import {
13
- sum
14
- } from "./chunk-7OU22ENP.mjs";
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-T5JCRGXA.mjs";
31
+ import "./chunk-IJLQVGW4.mjs";
29
32
  import {
30
- pick
31
- } from "./chunk-OFWKFUFZ.mjs";
33
+ clamp
34
+ } from "./chunk-MLCL773E.mjs";
32
35
  import {
33
- pickBy
34
- } from "./chunk-T2C2WVFL.mjs";
36
+ round
37
+ } from "./chunk-V7E5DGZP.mjs";
35
38
  import {
36
- omit
37
- } from "./chunk-PLTO44KM.mjs";
39
+ sum
40
+ } from "./chunk-7OU22ENP.mjs";
41
+ import "./chunk-N6EM6ETS.mjs";
38
42
  import {
39
- omitBy
40
- } from "./chunk-SF3V7XXM.mjs";
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-3GMXDQQQ.mjs";
60
+ } from "./chunk-62EFHAYX.mjs";
45
61
  import {
46
62
  xorBy
47
- } from "./chunk-MTT7OPUK.mjs";
63
+ } from "./chunk-EW3RT4QW.mjs";
48
64
  import {
49
65
  xorWith
50
- } from "./chunk-S3ZF7ZPG.mjs";
66
+ } from "./chunk-FCF2RHPW.mjs";
51
67
  import {
52
68
  zip
53
- } from "./chunk-L25VRQ54.mjs";
69
+ } from "./chunk-DD73BULA.mjs";
54
70
  import {
55
71
  zipWith
56
- } from "./chunk-C4IZ7TGA.mjs";
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-IFCX35BI.mjs";
84
+ } from "./chunk-NTLX2MPV.mjs";
60
85
  import {
61
86
  takeWhile
62
- } from "./chunk-LLOAPSQ6.mjs";
87
+ } from "./chunk-2IXFGSUA.mjs";
63
88
  import {
64
89
  union
65
- } from "./chunk-I2NAKQIE.mjs";
90
+ } from "./chunk-DAJZ3JCI.mjs";
91
+ import {
92
+ uniq
93
+ } from "./chunk-XFCW7XJ4.mjs";
66
94
  import {
67
95
  unionBy
68
- } from "./chunk-LIXL7PEP.mjs";
96
+ } from "./chunk-JBDGK6X4.mjs";
69
97
  import {
70
98
  unionWith
71
- } from "./chunk-AB3DGGY3.mjs";
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-DVRGUUQG.mjs";
102
+ } from "./chunk-2PFDLYQC.mjs";
103
+ import {
104
+ groupBy
105
+ } from "./chunk-LWXZFXY5.mjs";
81
106
  import {
82
107
  intersection
83
- } from "./chunk-YNRYG5OB.mjs";
108
+ } from "./chunk-7XTQCUMW.mjs";
84
109
  import {
85
110
  intersectionBy
86
- } from "./chunk-ANJSX6WH.mjs";
111
+ } from "./chunk-GNSJP2AB.mjs";
87
112
  import {
88
113
  intersectionWith
89
- } from "./chunk-6Z2YFKXQ.mjs";
114
+ } from "./chunk-KLJRZJOR.mjs";
90
115
  import {
91
116
  partition
92
- } from "./chunk-TF6N37OE.mjs";
117
+ } from "./chunk-5L2V7WD3.mjs";
93
118
  import {
94
119
  sample
95
- } from "./chunk-PHG5JCSW.mjs";
96
- import {
97
- shuffle
98
- } from "./chunk-KPG3XQEN.mjs";
120
+ } from "./chunk-DOOIIHT3.mjs";
99
121
  import {
100
- take
101
- } from "./chunk-4RRRH7OY.mjs";
122
+ chunk
123
+ } from "./chunk-E6C5EZQA.mjs";
102
124
  import {
103
- takeRight
104
- } from "./chunk-L3C6TG2V.mjs";
125
+ difference
126
+ } from "./chunk-M7UI5ETO.mjs";
105
127
  import {
106
128
  differenceBy
107
- } from "./chunk-HK5OJANS.mjs";
129
+ } from "./chunk-LVWX5B43.mjs";
108
130
  import {
109
131
  differenceWith
110
- } from "./chunk-5NSVMWDQ.mjs";
132
+ } from "./chunk-FQ4K36VD.mjs";
111
133
  import {
112
134
  drop
113
- } from "./chunk-25R2U4KM.mjs";
135
+ } from "./chunk-ACFP3XMB.mjs";
114
136
  import {
115
137
  dropRight
116
- } from "./chunk-EXU45QAF.mjs";
138
+ } from "./chunk-Q75KEFW5.mjs";
117
139
  import {
118
140
  dropRightWhile
119
- } from "./chunk-VOAKEOIM.mjs";
141
+ } from "./chunk-E7BJSLIX.mjs";
120
142
  import {
121
143
  dropWhile
122
- } from "./chunk-3PFYAKOD.mjs";
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,
@@ -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
@@ -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.2.1",
4
+ "version": "1.2.2-dev.69+fde86f7f",
5
5
  "workspaces": [
6
6
  "docs"
7
7
  ],
@@ -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":[]}
@@ -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":[]}
@@ -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