es-toolkit 1.2.1 → 1.2.2-dev.67

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