es-toolkit 1.2.1-dev.64 → 1.2.1-dev.66

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 (189) hide show
  1. package/dist/array/chunk.d.mts +1 -1
  2. package/dist/array/chunk.d.ts +1 -1
  3. package/dist/array/chunk.js.map +1 -1
  4. package/dist/array/chunk.mjs +1 -1
  5. package/dist/array/difference.d.mts +1 -1
  6. package/dist/array/difference.d.ts +1 -1
  7. package/dist/array/difference.js.map +1 -1
  8. package/dist/array/difference.mjs +1 -1
  9. package/dist/array/differenceBy.d.mts +1 -1
  10. package/dist/array/differenceBy.d.ts +1 -1
  11. package/dist/array/differenceBy.js.map +1 -1
  12. package/dist/array/differenceBy.mjs +1 -1
  13. package/dist/array/differenceWith.d.mts +1 -1
  14. package/dist/array/differenceWith.d.ts +1 -1
  15. package/dist/array/differenceWith.js.map +1 -1
  16. package/dist/array/differenceWith.mjs +1 -1
  17. package/dist/array/drop.d.mts +1 -1
  18. package/dist/array/drop.d.ts +1 -1
  19. package/dist/array/drop.js.map +1 -1
  20. package/dist/array/drop.mjs +1 -1
  21. package/dist/array/dropRight.d.mts +1 -1
  22. package/dist/array/dropRight.d.ts +1 -1
  23. package/dist/array/dropRight.js.map +1 -1
  24. package/dist/array/dropRight.mjs +1 -1
  25. package/dist/array/dropRightWhile.d.mts +1 -1
  26. package/dist/array/dropRightWhile.d.ts +1 -1
  27. package/dist/array/dropRightWhile.js.map +1 -1
  28. package/dist/array/dropRightWhile.mjs +2 -2
  29. package/dist/array/dropWhile.d.mts +1 -1
  30. package/dist/array/dropWhile.d.ts +1 -1
  31. package/dist/array/dropWhile.js.map +1 -1
  32. package/dist/array/dropWhile.mjs +1 -1
  33. package/dist/array/groupBy.d.mts +1 -1
  34. package/dist/array/groupBy.d.ts +1 -1
  35. package/dist/array/groupBy.js.map +1 -1
  36. package/dist/array/groupBy.mjs +1 -1
  37. package/dist/array/index.js.map +1 -1
  38. package/dist/array/index.mjs +39 -39
  39. package/dist/array/intersection.d.mts +1 -1
  40. package/dist/array/intersection.d.ts +1 -1
  41. package/dist/array/intersection.js.map +1 -1
  42. package/dist/array/intersection.mjs +1 -1
  43. package/dist/array/intersectionBy.d.mts +1 -1
  44. package/dist/array/intersectionBy.d.ts +1 -1
  45. package/dist/array/intersectionBy.js.map +1 -1
  46. package/dist/array/intersectionBy.mjs +1 -1
  47. package/dist/array/intersectionWith.d.mts +1 -1
  48. package/dist/array/intersectionWith.d.ts +1 -1
  49. package/dist/array/intersectionWith.js.map +1 -1
  50. package/dist/array/intersectionWith.mjs +1 -1
  51. package/dist/array/partition.d.mts +1 -1
  52. package/dist/array/partition.d.ts +1 -1
  53. package/dist/array/partition.js.map +1 -1
  54. package/dist/array/partition.mjs +1 -1
  55. package/dist/array/sample.d.mts +1 -1
  56. package/dist/array/sample.d.ts +1 -1
  57. package/dist/array/sample.js.map +1 -1
  58. package/dist/array/sample.mjs +1 -1
  59. package/dist/array/shuffle.d.mts +1 -1
  60. package/dist/array/shuffle.d.ts +1 -1
  61. package/dist/array/shuffle.js.map +1 -1
  62. package/dist/array/shuffle.mjs +1 -1
  63. package/dist/array/take.d.mts +1 -1
  64. package/dist/array/take.d.ts +1 -1
  65. package/dist/array/take.js.map +1 -1
  66. package/dist/array/take.mjs +1 -1
  67. package/dist/array/takeRight.d.mts +1 -1
  68. package/dist/array/takeRight.d.ts +1 -1
  69. package/dist/array/takeRight.js.map +1 -1
  70. package/dist/array/takeRight.mjs +1 -1
  71. package/dist/array/takeRightWhile.d.mts +1 -1
  72. package/dist/array/takeRightWhile.d.ts +1 -1
  73. package/dist/array/takeRightWhile.js.map +1 -1
  74. package/dist/array/takeRightWhile.mjs +1 -1
  75. package/dist/array/takeWhile.d.mts +1 -1
  76. package/dist/array/takeWhile.d.ts +1 -1
  77. package/dist/array/takeWhile.js.map +1 -1
  78. package/dist/array/takeWhile.mjs +1 -1
  79. package/dist/array/union.d.mts +1 -1
  80. package/dist/array/union.d.ts +1 -1
  81. package/dist/array/union.js.map +1 -1
  82. package/dist/array/union.mjs +2 -2
  83. package/dist/array/unionBy.d.mts +1 -1
  84. package/dist/array/unionBy.d.ts +1 -1
  85. package/dist/array/unionBy.js.map +1 -1
  86. package/dist/array/unionBy.mjs +1 -1
  87. package/dist/array/unionWith.d.mts +1 -1
  88. package/dist/array/unionWith.d.ts +1 -1
  89. package/dist/array/unionWith.js.map +1 -1
  90. package/dist/array/unionWith.mjs +2 -2
  91. package/dist/array/uniq.d.mts +1 -1
  92. package/dist/array/uniq.d.ts +1 -1
  93. package/dist/array/uniq.js.map +1 -1
  94. package/dist/array/uniq.mjs +1 -1
  95. package/dist/array/uniqBy.d.mts +1 -1
  96. package/dist/array/uniqBy.d.ts +1 -1
  97. package/dist/array/uniqBy.js.map +1 -1
  98. package/dist/array/uniqBy.mjs +2 -2
  99. package/dist/array/uniqWith.d.mts +1 -1
  100. package/dist/array/uniqWith.d.ts +1 -1
  101. package/dist/array/uniqWith.js.map +1 -1
  102. package/dist/array/uniqWith.mjs +1 -1
  103. package/dist/array/xor.d.mts +1 -1
  104. package/dist/array/xor.d.ts +1 -1
  105. package/dist/array/xor.js.map +1 -1
  106. package/dist/array/xor.mjs +5 -5
  107. package/dist/array/xorBy.d.mts +1 -1
  108. package/dist/array/xorBy.d.ts +1 -1
  109. package/dist/array/xorBy.js.map +1 -1
  110. package/dist/array/xorBy.mjs +4 -4
  111. package/dist/array/xorWith.d.mts +1 -1
  112. package/dist/array/xorWith.d.ts +1 -1
  113. package/dist/array/xorWith.js.map +1 -1
  114. package/dist/array/xorWith.mjs +5 -5
  115. package/dist/array/zip.d.mts +4 -4
  116. package/dist/array/zip.d.ts +4 -4
  117. package/dist/array/zip.js.map +1 -1
  118. package/dist/array/zip.mjs +1 -1
  119. package/dist/array/zipWith.d.mts +4 -4
  120. package/dist/array/zipWith.d.ts +4 -4
  121. package/dist/array/zipWith.js.map +1 -1
  122. package/dist/array/zipWith.mjs +1 -1
  123. package/dist/{chunk-LLOAPSQ6.mjs → chunk-2IXFGSUA.mjs} +1 -1
  124. package/dist/{chunk-LLOAPSQ6.mjs.map → chunk-2IXFGSUA.mjs.map} +1 -1
  125. package/dist/{chunk-TF6N37OE.mjs → chunk-5L2V7WD3.mjs} +1 -1
  126. package/dist/{chunk-TF6N37OE.mjs.map → chunk-5L2V7WD3.mjs.map} +1 -1
  127. package/dist/{chunk-AB3DGGY3.mjs → chunk-5P2QE2VI.mjs} +2 -2
  128. package/dist/{chunk-AB3DGGY3.mjs.map → chunk-5P2QE2VI.mjs.map} +1 -1
  129. package/dist/{chunk-T6NXSQ6Z.mjs → chunk-62EFHAYX.mjs} +4 -4
  130. package/dist/{chunk-T6NXSQ6Z.mjs.map → chunk-62EFHAYX.mjs.map} +1 -1
  131. package/dist/{chunk-YNRYG5OB.mjs → chunk-7XTQCUMW.mjs} +1 -1
  132. package/dist/{chunk-YNRYG5OB.mjs.map → chunk-7XTQCUMW.mjs.map} +1 -1
  133. package/dist/{chunk-25R2U4KM.mjs → chunk-ACFP3XMB.mjs} +1 -1
  134. package/dist/{chunk-25R2U4KM.mjs.map → chunk-ACFP3XMB.mjs.map} +1 -1
  135. package/dist/{chunk-XPOJM4E7.mjs → chunk-DAJZ3JCI.mjs} +2 -2
  136. package/dist/{chunk-XPOJM4E7.mjs.map → chunk-DAJZ3JCI.mjs.map} +1 -1
  137. package/dist/{chunk-L25VRQ54.mjs → chunk-DD73BULA.mjs} +1 -1
  138. package/dist/chunk-DD73BULA.mjs.map +1 -0
  139. package/dist/{chunk-PHG5JCSW.mjs → chunk-DOOIIHT3.mjs} +1 -1
  140. package/dist/{chunk-PHG5JCSW.mjs.map → chunk-DOOIIHT3.mjs.map} +1 -1
  141. package/dist/{chunk-KPG3XQEN.mjs → chunk-DPLJQQFX.mjs} +1 -1
  142. package/dist/chunk-DPLJQQFX.mjs.map +1 -0
  143. package/dist/{chunk-OS5PZ4B4.mjs → chunk-E6C5EZQA.mjs} +1 -1
  144. package/dist/{chunk-OS5PZ4B4.mjs.map → chunk-E6C5EZQA.mjs.map} +1 -1
  145. package/dist/{chunk-VOAKEOIM.mjs → chunk-E7BJSLIX.mjs} +2 -2
  146. package/dist/{chunk-VOAKEOIM.mjs.map → chunk-E7BJSLIX.mjs.map} +1 -1
  147. package/dist/{chunk-RVAUVY4Q.mjs → chunk-EW3RT4QW.mjs} +4 -4
  148. package/dist/{chunk-RVAUVY4Q.mjs.map → chunk-EW3RT4QW.mjs.map} +1 -1
  149. package/dist/{chunk-5NSVMWDQ.mjs → chunk-FQ4K36VD.mjs} +1 -1
  150. package/dist/{chunk-5NSVMWDQ.mjs.map → chunk-FQ4K36VD.mjs.map} +1 -1
  151. package/dist/{chunk-QN3DD4XG.mjs → chunk-GNSJP2AB.mjs} +1 -1
  152. package/dist/{chunk-QN3DD4XG.mjs.map → chunk-GNSJP2AB.mjs.map} +1 -1
  153. package/dist/{chunk-LIXL7PEP.mjs → chunk-JBDGK6X4.mjs} +1 -1
  154. package/dist/{chunk-LIXL7PEP.mjs.map → chunk-JBDGK6X4.mjs.map} +1 -1
  155. package/dist/{chunk-6Z2YFKXQ.mjs → chunk-KLJRZJOR.mjs} +1 -1
  156. package/dist/{chunk-6Z2YFKXQ.mjs.map → chunk-KLJRZJOR.mjs.map} +1 -1
  157. package/dist/{chunk-JD42XAYW.mjs → chunk-LCYPY5SA.mjs} +2 -2
  158. package/dist/{chunk-JD42XAYW.mjs.map → chunk-LCYPY5SA.mjs.map} +1 -1
  159. package/dist/{chunk-S3ZF7ZPG.mjs → chunk-LVB7BYUY.mjs} +4 -4
  160. package/dist/{chunk-S3ZF7ZPG.mjs.map → chunk-LVB7BYUY.mjs.map} +1 -1
  161. package/dist/{chunk-HK5OJANS.mjs → chunk-LVWX5B43.mjs} +1 -1
  162. package/dist/{chunk-HK5OJANS.mjs.map → chunk-LVWX5B43.mjs.map} +1 -1
  163. package/dist/{chunk-V6LXSPMF.mjs → chunk-LWXZFXY5.mjs} +1 -1
  164. package/dist/{chunk-V6LXSPMF.mjs.map → chunk-LWXZFXY5.mjs.map} +1 -1
  165. package/dist/{chunk-SORNYLIU.mjs → chunk-M7UI5ETO.mjs} +1 -1
  166. package/dist/{chunk-SORNYLIU.mjs.map → chunk-M7UI5ETO.mjs.map} +1 -1
  167. package/dist/{chunk-4RRRH7OY.mjs → chunk-ME352XO7.mjs} +1 -1
  168. package/dist/{chunk-4RRRH7OY.mjs.map → chunk-ME352XO7.mjs.map} +1 -1
  169. package/dist/{chunk-IFCX35BI.mjs → chunk-NTLX2MPV.mjs} +1 -1
  170. package/dist/{chunk-IFCX35BI.mjs.map → chunk-NTLX2MPV.mjs.map} +1 -1
  171. package/dist/{chunk-DVRGUUQG.mjs → chunk-NXPEUTDI.mjs} +1 -1
  172. package/dist/{chunk-DVRGUUQG.mjs.map → chunk-NXPEUTDI.mjs.map} +1 -1
  173. package/dist/{chunk-EXU45QAF.mjs → chunk-Q75KEFW5.mjs} +1 -1
  174. package/dist/{chunk-EXU45QAF.mjs.map → chunk-Q75KEFW5.mjs.map} +1 -1
  175. package/dist/{chunk-C4IZ7TGA.mjs → chunk-T5FDOBCA.mjs} +1 -1
  176. package/dist/chunk-T5FDOBCA.mjs.map +1 -0
  177. package/dist/{chunk-3PFYAKOD.mjs → chunk-VNMVP3DL.mjs} +1 -1
  178. package/dist/{chunk-3PFYAKOD.mjs.map → chunk-VNMVP3DL.mjs.map} +1 -1
  179. package/dist/{chunk-L3C6TG2V.mjs → chunk-XDKEPIUV.mjs} +1 -1
  180. package/dist/{chunk-L3C6TG2V.mjs.map → chunk-XDKEPIUV.mjs.map} +1 -1
  181. package/dist/{chunk-5IY7KVTH.mjs → chunk-XFCW7XJ4.mjs} +1 -1
  182. package/dist/{chunk-5IY7KVTH.mjs.map → chunk-XFCW7XJ4.mjs.map} +1 -1
  183. package/dist/function/index.mjs +3 -3
  184. package/dist/index.js.map +1 -1
  185. package/dist/index.mjs +60 -60
  186. package/package.json +1 -1
  187. package/dist/chunk-C4IZ7TGA.mjs.map +0 -1
  188. package/dist/chunk-KPG3XQEN.mjs.map +0 -1
  189. package/dist/chunk-L25VRQ54.mjs.map +0 -1
@@ -1,94 +1,94 @@
1
1
  import "../chunk-EJGAXTF7.mjs";
2
- import {
3
- zipWith
4
- } from "../chunk-C4IZ7TGA.mjs";
5
2
  import {
6
3
  uniqBy
7
- } from "../chunk-JD42XAYW.mjs";
4
+ } from "../chunk-LCYPY5SA.mjs";
8
5
  import {
9
6
  xor
10
- } from "../chunk-T6NXSQ6Z.mjs";
7
+ } from "../chunk-62EFHAYX.mjs";
11
8
  import {
12
9
  xorBy
13
- } from "../chunk-RVAUVY4Q.mjs";
10
+ } from "../chunk-EW3RT4QW.mjs";
14
11
  import {
15
12
  xorWith
16
- } from "../chunk-S3ZF7ZPG.mjs";
17
- import {
18
- unionWith
19
- } from "../chunk-AB3DGGY3.mjs";
20
- import {
21
- uniqWith
22
- } from "../chunk-DVRGUUQG.mjs";
13
+ } from "../chunk-LVB7BYUY.mjs";
23
14
  import {
24
15
  zip
25
- } from "../chunk-L25VRQ54.mjs";
16
+ } from "../chunk-DD73BULA.mjs";
26
17
  import {
27
- sample
28
- } from "../chunk-PHG5JCSW.mjs";
18
+ zipWith
19
+ } from "../chunk-T5FDOBCA.mjs";
29
20
  import {
30
21
  shuffle
31
- } from "../chunk-KPG3XQEN.mjs";
22
+ } from "../chunk-DPLJQQFX.mjs";
32
23
  import {
33
24
  take
34
- } from "../chunk-4RRRH7OY.mjs";
25
+ } from "../chunk-ME352XO7.mjs";
35
26
  import {
36
27
  takeRight
37
- } from "../chunk-L3C6TG2V.mjs";
28
+ } from "../chunk-XDKEPIUV.mjs";
38
29
  import {
39
30
  takeRightWhile
40
- } from "../chunk-IFCX35BI.mjs";
31
+ } from "../chunk-NTLX2MPV.mjs";
41
32
  import {
42
33
  takeWhile
43
- } from "../chunk-LLOAPSQ6.mjs";
34
+ } from "../chunk-2IXFGSUA.mjs";
44
35
  import {
45
36
  union
46
- } from "../chunk-XPOJM4E7.mjs";
37
+ } from "../chunk-DAJZ3JCI.mjs";
47
38
  import {
48
39
  uniq
49
- } from "../chunk-5IY7KVTH.mjs";
40
+ } from "../chunk-XFCW7XJ4.mjs";
50
41
  import {
51
42
  unionBy
52
- } from "../chunk-LIXL7PEP.mjs";
43
+ } from "../chunk-JBDGK6X4.mjs";
53
44
  import {
54
- dropRightWhile
55
- } from "../chunk-VOAKEOIM.mjs";
45
+ unionWith
46
+ } from "../chunk-5P2QE2VI.mjs";
56
47
  import {
57
- dropWhile
58
- } from "../chunk-3PFYAKOD.mjs";
48
+ uniqWith
49
+ } from "../chunk-NXPEUTDI.mjs";
59
50
  import {
60
51
  groupBy
61
- } from "../chunk-V6LXSPMF.mjs";
52
+ } from "../chunk-LWXZFXY5.mjs";
62
53
  import {
63
54
  intersection
64
- } from "../chunk-YNRYG5OB.mjs";
55
+ } from "../chunk-7XTQCUMW.mjs";
65
56
  import {
66
57
  intersectionBy
67
- } from "../chunk-QN3DD4XG.mjs";
58
+ } from "../chunk-GNSJP2AB.mjs";
68
59
  import {
69
60
  intersectionWith
70
- } from "../chunk-6Z2YFKXQ.mjs";
61
+ } from "../chunk-KLJRZJOR.mjs";
71
62
  import {
72
63
  partition
73
- } from "../chunk-TF6N37OE.mjs";
64
+ } from "../chunk-5L2V7WD3.mjs";
65
+ import {
66
+ sample
67
+ } from "../chunk-DOOIIHT3.mjs";
74
68
  import {
75
69
  chunk
76
- } from "../chunk-OS5PZ4B4.mjs";
70
+ } from "../chunk-E6C5EZQA.mjs";
77
71
  import {
78
72
  difference
79
- } from "../chunk-SORNYLIU.mjs";
73
+ } from "../chunk-M7UI5ETO.mjs";
80
74
  import {
81
75
  differenceBy
82
- } from "../chunk-HK5OJANS.mjs";
76
+ } from "../chunk-LVWX5B43.mjs";
83
77
  import {
84
78
  differenceWith
85
- } from "../chunk-5NSVMWDQ.mjs";
79
+ } from "../chunk-FQ4K36VD.mjs";
86
80
  import {
87
81
  drop
88
- } from "../chunk-25R2U4KM.mjs";
82
+ } from "../chunk-ACFP3XMB.mjs";
89
83
  import {
90
84
  dropRight
91
- } from "../chunk-EXU45QAF.mjs";
85
+ } from "../chunk-Q75KEFW5.mjs";
86
+ import {
87
+ dropRightWhile
88
+ } from "../chunk-E7BJSLIX.mjs";
89
+ import {
90
+ dropWhile
91
+ } from "../chunk-VNMVP3DL.mjs";
92
92
  import "../chunk-2MM5EJJX.mjs";
93
93
  export {
94
94
  chunk,
@@ -15,6 +15,6 @@
15
15
  * const result = intersection(array1, array2);
16
16
  * // result will be [3, 4, 5] since these elements are in both arrays.
17
17
  */
18
- declare function intersection<T>(firstArr: T[], secondArr: T[]): T[];
18
+ declare function intersection<T>(firstArr: readonly T[], secondArr: readonly T[]): T[];
19
19
 
20
20
  export { intersection };
@@ -15,6 +15,6 @@
15
15
  * const result = intersection(array1, array2);
16
16
  * // result will be [3, 4, 5] since these elements are in both arrays.
17
17
  */
18
- declare function intersection<T>(firstArr: T[], secondArr: T[]): T[];
18
+ declare function intersection<T>(firstArr: readonly T[], secondArr: readonly T[]): T[];
19
19
 
20
20
  export { intersection };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/intersection.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements that are\n * present in both arrays. It effectively filters out any elements from the first array that\n * are not found in the second array.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @returns {T[]} A new array containing the elements that are present in both arrays.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [3, 4, 5, 6, 7];\n * const result = intersection(array1, array2);\n * // result will be [3, 4, 5] since these elements are in both arrays.\n */\nexport function intersection<T>(firstArr: T[], secondArr: T[]): T[] {\n return firstArr.filter(item => {\n return secondArr.includes(item);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,aAAgB,UAAe,WAAqB;AAClE,SAAO,SAAS,OAAO,UAAQ;AAC7B,WAAO,UAAU,SAAS,IAAI;AAAA,EAChC,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../src/array/intersection.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements that are\n * present in both arrays. It effectively filters out any elements from the first array that\n * are not found in the second array.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @returns {T[]} A new array containing the elements that are present in both arrays.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [3, 4, 5, 6, 7];\n * const result = intersection(array1, array2);\n * // result will be [3, 4, 5] since these elements are in both arrays.\n */\nexport function intersection<T>(firstArr: readonly T[], secondArr: readonly T[]): T[] {\n return firstArr.filter(item => {\n return secondArr.includes(item);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,aAAgB,UAAwB,WAA8B;AACpF,SAAO,SAAS,OAAO,UAAQ;AAC7B,WAAO,UAAU,SAAS,IAAI;AAAA,EAChC,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  intersection
3
- } from "../chunk-YNRYG5OB.mjs";
3
+ } from "../chunk-7XTQCUMW.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  intersection
@@ -18,6 +18,6 @@
18
18
  * const result = intersectionBy(array1, array2, mapper);
19
19
  * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.
20
20
  */
21
- declare function intersectionBy<T, U>(firstArr: T[], secondArr: T[], mapper: (item: T) => U): T[];
21
+ declare function intersectionBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (item: T) => U): T[];
22
22
 
23
23
  export { intersectionBy };
@@ -18,6 +18,6 @@
18
18
  * const result = intersectionBy(array1, array2, mapper);
19
19
  * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.
20
20
  */
21
- declare function intersectionBy<T, U>(firstArr: T[], secondArr: T[], mapper: (item: T) => U): T[];
21
+ declare function intersectionBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (item: T) => U): T[];
22
22
 
23
23
  export { intersectionBy };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/intersectionBy.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a mapping function.\n *\n * This function takes two arrays and a mapping function. It returns a new array containing\n * the elements from the first array that, when mapped using the provided function, have matching\n * mapped elements in the second array. It effectively filters out any elements from the first array\n * that do not have corresponding mapped values in the second array.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(item: T) => U} mapper - A function to map the elements of both arrays for comparison.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding mapped values in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.\n */\nexport function intersectionBy<T, U>(firstArr: T[], secondArr: T[], mapper: (item: T) => U): T[] {\n const mappedSecondSet = new Set(secondArr.map(mapper));\n return firstArr.filter(item => mappedSecondSet.has(mapper(item)));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,eAAqB,UAAe,WAAgB,QAA6B;AAC/F,QAAM,kBAAkB,IAAI,IAAI,UAAU,IAAI,MAAM,CAAC;AACrD,SAAO,SAAS,OAAO,UAAQ,gBAAgB,IAAI,OAAO,IAAI,CAAC,CAAC;AAClE;","names":[]}
1
+ {"version":3,"sources":["../../src/array/intersectionBy.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a mapping function.\n *\n * This function takes two arrays and a mapping function. It returns a new array containing\n * the elements from the first array that, when mapped using the provided function, have matching\n * mapped elements in the second array. It effectively filters out any elements from the first array\n * that do not have corresponding mapped values in the second array.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(item: T) => U} mapper - A function to map the elements of both arrays for comparison.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding mapped values in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.\n */\nexport function intersectionBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (item: T) => U): T[] {\n const mappedSecondSet = new Set(secondArr.map(mapper));\n return firstArr.filter(item => mappedSecondSet.has(mapper(item)));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,eAAqB,UAAwB,WAAyB,QAA6B;AACjH,QAAM,kBAAkB,IAAI,IAAI,UAAU,IAAI,MAAM,CAAC;AACrD,SAAO,SAAS,OAAO,UAAQ,gBAAgB,IAAI,OAAO,IAAI,CAAC,CAAC;AAClE;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  intersectionBy
3
- } from "../chunk-QN3DD4XG.mjs";
3
+ } from "../chunk-GNSJP2AB.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  intersectionBy
@@ -19,6 +19,6 @@
19
19
  * const result = intersectionWith(array1, array2, areItemsEqual);
20
20
  * // result will be [{ id: 2 }] since this element has a matching id in both arrays.
21
21
  */
22
- declare function intersectionWith<T>(firstArr: T[], secondArr: T[], areItemsEqual: (x: T, y: T) => boolean): T[];
22
+ declare function intersectionWith<T>(firstArr: readonly T[], secondArr: readonly T[], areItemsEqual: (x: T, y: T) => boolean): T[];
23
23
 
24
24
  export { intersectionWith };
@@ -19,6 +19,6 @@
19
19
  * const result = intersectionWith(array1, array2, areItemsEqual);
20
20
  * // result will be [{ id: 2 }] since this element has a matching id in both arrays.
21
21
  */
22
- declare function intersectionWith<T>(firstArr: T[], secondArr: T[], areItemsEqual: (x: T, y: T) => boolean): T[];
22
+ declare function intersectionWith<T>(firstArr: readonly T[], secondArr: readonly T[], areItemsEqual: (x: T, y: T) => boolean): T[];
23
23
 
24
24
  export { intersectionWith };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/intersectionWith.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a custom equality function.\n *\n * This function takes two arrays and a custom equality function. It returns a new array containing\n * the elements from the first array that have matching elements in the second array, as determined\n * by the custom equality function. It effectively filters out any elements from the first array that\n * do not have corresponding matches in the second array according to the equality function.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(x: T, y: T) => boolean} areItemsEqual - A custom function to determine if two elements are equal.\n * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = intersectionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 2 }] since this element has a matching id in both arrays.\n */\nexport function intersectionWith<T>(firstArr: T[], secondArr: T[], areItemsEqual: (x: T, y: T) => boolean): T[] {\n return firstArr.filter(firstItem => {\n return secondArr.some(secondItem => {\n return areItemsEqual(firstItem, secondItem);\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,iBAAoB,UAAe,WAAgB,eAA6C;AAC9G,SAAO,SAAS,OAAO,eAAa;AAClC,WAAO,UAAU,KAAK,gBAAc;AAClC,aAAO,cAAc,WAAW,UAAU;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../src/array/intersectionWith.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a custom equality function.\n *\n * This function takes two arrays and a custom equality function. It returns a new array containing\n * the elements from the first array that have matching elements in the second array, as determined\n * by the custom equality function. It effectively filters out any elements from the first array that\n * do not have corresponding matches in the second array according to the equality function.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(x: T, y: T) => boolean} areItemsEqual - A custom function to determine if two elements are equal.\n * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = intersectionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 2 }] since this element has a matching id in both arrays.\n */\nexport function intersectionWith<T>(firstArr: readonly T[], secondArr: readonly T[], areItemsEqual: (x: T, y: T) => boolean): T[] {\n return firstArr.filter(firstItem => {\n return secondArr.some(secondItem => {\n return areItemsEqual(firstItem, secondItem);\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,iBAAoB,UAAwB,WAAyB,eAA6C;AAChI,SAAO,SAAS,OAAO,eAAa;AAClC,WAAO,UAAU,KAAK,gBAAc;AAClC,aAAO,cAAc,WAAW,UAAU;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  intersectionWith
3
- } from "../chunk-6Z2YFKXQ.mjs";
3
+ } from "../chunk-KLJRZJOR.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  intersectionWith
@@ -19,6 +19,6 @@
19
19
  * const [even, odd] = partition(array, isEven);
20
20
  * // even will be [2, 4], and odd will be [1, 3, 5]
21
21
  */
22
- declare function partition<T>(arr: T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]];
22
+ declare function partition<T>(arr: readonly T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]];
23
23
 
24
24
  export { partition };
@@ -19,6 +19,6 @@
19
19
  * const [even, odd] = partition(array, isEven);
20
20
  * // even will be [2, 4], and odd will be [1, 3, 5]
21
21
  */
22
- declare function partition<T>(arr: T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]];
22
+ declare function partition<T>(arr: readonly T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]];
23
23
 
24
24
  export { partition };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into two groups based on a predicate function.\n *\n * This function takes an array and a predicate function. It returns a tuple of two arrays:\n * the first array contains elements for which the predicate function returns true, and\n * the second array contains elements for which the predicate function returns false.\n *\n * @param {T[]} arr - The array to partition.\n * @param {(value: T) => boolean} isInTruthy - A predicate function that determines\n * whether an element should be placed in the truthy array. The function is called with each\n * element of the array.\n * @returns {[T[], T[]]} A tuple containing two arrays: the first array contains elements for\n * which the predicate returned true, and the second array contains elements for which the\n * predicate returned false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const isEven = x => x % 2 === 0;\n * const [even, odd] = partition(array, isEven);\n * // even will be [2, 4], and odd will be [1, 3, 5]\n */\nexport function partition<T>(arr: T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]] {\n const truthy: T[] = [];\n const falsy: T[] = [];\n\n for (const item of arr) {\n if (isInTruthy(item)) {\n truthy.push(item);\n } else {\n falsy.push(item);\n }\n }\n\n return [truthy, falsy];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,UAAa,KAAU,YAA8D;AACnG,QAAM,SAAc,CAAC;AACrB,QAAM,QAAa,CAAC;AAEpB,aAAW,QAAQ,KAAK;AACtB,QAAI,WAAW,IAAI,GAAG;AACpB,aAAO,KAAK,IAAI;AAAA,IAClB,OAAO;AACL,YAAM,KAAK,IAAI;AAAA,IACjB;AAAA,EACF;AAEA,SAAO,CAAC,QAAQ,KAAK;AACvB;","names":[]}
1
+ {"version":3,"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into two groups based on a predicate function.\n *\n * This function takes an array and a predicate function. It returns a tuple of two arrays:\n * the first array contains elements for which the predicate function returns true, and\n * the second array contains elements for which the predicate function returns false.\n *\n * @param {T[]} arr - The array to partition.\n * @param {(value: T) => boolean} isInTruthy - A predicate function that determines\n * whether an element should be placed in the truthy array. The function is called with each\n * element of the array.\n * @returns {[T[], T[]]} A tuple containing two arrays: the first array contains elements for\n * which the predicate returned true, and the second array contains elements for which the\n * predicate returned false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const isEven = x => x % 2 === 0;\n * const [even, odd] = partition(array, isEven);\n * // even will be [2, 4], and odd will be [1, 3, 5]\n */\nexport function partition<T>(arr: readonly T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]] {\n const truthy: T[] = [];\n const falsy: T[] = [];\n\n for (const item of arr) {\n if (isInTruthy(item)) {\n truthy.push(item);\n } else {\n falsy.push(item);\n }\n }\n\n return [truthy, falsy];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,UAAa,KAAmB,YAA8D;AAC5G,QAAM,SAAc,CAAC;AACrB,QAAM,QAAa,CAAC;AAEpB,aAAW,QAAQ,KAAK;AACtB,QAAI,WAAW,IAAI,GAAG;AACpB,aAAO,KAAK,IAAI;AAAA,IAClB,OAAO;AACL,YAAM,KAAK,IAAI;AAAA,IACjB;AAAA,EACF;AAEA,SAAO,CAAC,QAAQ,KAAK;AACvB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  partition
3
- } from "../chunk-TF6N37OE.mjs";
3
+ } from "../chunk-5L2V7WD3.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  partition
@@ -11,6 +11,6 @@
11
11
  * const randomElement = sample(array);
12
12
  * // randomElement will be one of the elements from the array, selected randomly.
13
13
  */
14
- declare function sample<T>(arr: T[]): T;
14
+ declare function sample<T>(arr: readonly T[]): T;
15
15
 
16
16
  export { sample };
@@ -11,6 +11,6 @@
11
11
  * const randomElement = sample(array);
12
12
  * // randomElement will be one of the elements from the array, selected randomly.
13
13
  */
14
- declare function sample<T>(arr: T[]): T;
14
+ declare function sample<T>(arr: readonly T[]): T;
15
15
 
16
16
  export { sample };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/sample.ts"],"sourcesContent":["/**\n * Returns a random element from an array.\n *\n * This function takes an array and returns a single element selected randomly from the array.\n *\n * @param {T[]} arr - The array to sample from.\n * @returns {T} A random element from the array.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const randomElement = sample(array);\n * // randomElement will be one of the elements from the array, selected randomly.\n */\nexport function sample<T>(arr: T[]): T {\n const randomIndex = Math.floor(Math.random() * arr.length);\n return arr[randomIndex];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,OAAU,KAAa;AACrC,QAAM,cAAc,KAAK,MAAM,KAAK,OAAO,IAAI,IAAI,MAAM;AACzD,SAAO,IAAI,WAAW;AACxB;","names":[]}
1
+ {"version":3,"sources":["../../src/array/sample.ts"],"sourcesContent":["/**\n * Returns a random element from an array.\n *\n * This function takes an array and returns a single element selected randomly from the array.\n *\n * @param {T[]} arr - The array to sample from.\n * @returns {T} A random element from the array.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const randomElement = sample(array);\n * // randomElement will be one of the elements from the array, selected randomly.\n */\nexport function sample<T>(arr: readonly T[]): T {\n const randomIndex = Math.floor(Math.random() * arr.length);\n return arr[randomIndex];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,OAAU,KAAsB;AAC9C,QAAM,cAAc,KAAK,MAAM,KAAK,OAAO,IAAI,IAAI,MAAM;AACzD,SAAO,IAAI,WAAW;AACxB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sample
3
- } from "../chunk-PHG5JCSW.mjs";
3
+ } from "../chunk-DOOIIHT3.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  sample
@@ -11,6 +11,6 @@
11
11
  * const shuffledArray = shuffle(array);
12
12
  * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2]
13
13
  */
14
- declare function shuffle<T>(arr: T[]): T[];
14
+ declare function shuffle<T>(arr: readonly T[]): T[];
15
15
 
16
16
  export { shuffle };
@@ -11,6 +11,6 @@
11
11
  * const shuffledArray = shuffle(array);
12
12
  * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2]
13
13
  */
14
- declare function shuffle<T>(arr: T[]): T[];
14
+ declare function shuffle<T>(arr: readonly T[]): T[];
15
15
 
16
16
  export { shuffle };
@@ -1 +1 @@
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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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
+ {"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: readonly 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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,QAAW,KAAwB;AACjD,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,6 +1,6 @@
1
1
  import {
2
2
  shuffle
3
- } from "../chunk-KPG3XQEN.mjs";
3
+ } from "../chunk-DPLJQQFX.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  shuffle
@@ -20,6 +20,6 @@
20
20
  * // Returns [1, 2, 3]
21
21
  * take([1, 2, 3], 5);
22
22
  */
23
- declare function take<T>(arr: T[], count: number): T[];
23
+ declare function take<T>(arr: readonly T[], count: number): T[];
24
24
 
25
25
  export { take };
@@ -20,6 +20,6 @@
20
20
  * // Returns [1, 2, 3]
21
21
  * take([1, 2, 3], 5);
22
22
  */
23
- declare function take<T>(arr: T[], count: number): T[];
23
+ declare function take<T>(arr: readonly T[], count: number): T[];
24
24
 
25
25
  export { take };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/take.ts"],"sourcesContent":["/**\n * Returns a new array containing the first `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the first `count` elements from `arr`.\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3, 4, 5], 3);\n *\n * @example\n * // Returns ['a', 'b']\n * take(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3], 5);\n */\nexport function take<T>(arr: T[], count: number): T[] {\n return arr.slice(0, count);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBO,SAAS,KAAQ,KAAU,OAAoB;AACpD,SAAO,IAAI,MAAM,GAAG,KAAK;AAC3B;","names":[]}
1
+ {"version":3,"sources":["../../src/array/take.ts"],"sourcesContent":["/**\n * Returns a new array containing the first `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the first `count` elements from `arr`.\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3, 4, 5], 3);\n *\n * @example\n * // Returns ['a', 'b']\n * take(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3], 5);\n */\nexport function take<T>(arr: readonly T[], count: number): T[] {\n return arr.slice(0, count);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBO,SAAS,KAAQ,KAAmB,OAAoB;AAC7D,SAAO,IAAI,MAAM,GAAG,KAAK;AAC3B;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  take
3
- } from "../chunk-4RRRH7OY.mjs";
3
+ } from "../chunk-ME352XO7.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  take
@@ -18,6 +18,6 @@
18
18
  * // Returns [1, 2, 3]
19
19
  * takeRight([1, 2, 3], 5);
20
20
  */
21
- declare function takeRight<T>(arr: T[], count: number): T[];
21
+ declare function takeRight<T>(arr: readonly T[], count: number): T[];
22
22
 
23
23
  export { takeRight };
@@ -18,6 +18,6 @@
18
18
  * // Returns [1, 2, 3]
19
19
  * takeRight([1, 2, 3], 5);
20
20
  */
21
- declare function takeRight<T>(arr: T[], count: number): T[];
21
+ declare function takeRight<T>(arr: readonly T[], count: number): T[];
22
22
 
23
23
  export { takeRight };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/takeRight.ts"],"sourcesContent":["/**\n * Returns a new array containing the last `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the last `count` elements from `arr`.\n *\n * @example\n * // Returns [4, 5]\n * takeRight([1, 2, 3, 4, 5], 2);\n *\n * @example\n * // Returns ['b', 'c']\n * takeRight(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * takeRight([1, 2, 3], 5);\n */\nexport function takeRight<T>(arr: T[], count: number): T[] {\n if (count === 0) {\n return [];\n }\n\n return arr.slice(-count);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,UAAa,KAAU,OAAoB;AACzD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,CAAC,KAAK;AACzB;","names":[]}
1
+ {"version":3,"sources":["../../src/array/takeRight.ts"],"sourcesContent":["/**\n * Returns a new array containing the last `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the last `count` elements from `arr`.\n *\n * @example\n * // Returns [4, 5]\n * takeRight([1, 2, 3, 4, 5], 2);\n *\n * @example\n * // Returns ['b', 'c']\n * takeRight(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * takeRight([1, 2, 3], 5);\n */\nexport function takeRight<T>(arr: readonly T[], count: number): T[] {\n if (count === 0) {\n return [];\n }\n\n return arr.slice(-count);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,UAAa,KAAmB,OAAoB;AAClE,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,CAAC,KAAK;AACzB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  takeRight
3
- } from "../chunk-L3C6TG2V.mjs";
3
+ } from "../chunk-XDKEPIUV.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  takeRight
@@ -15,6 +15,6 @@
15
15
  * // Returns []
16
16
  * takeRightWhile([1, 2, 3], n => n > 3);
17
17
  */
18
- declare function takeRightWhile<T>(arr: T[], shouldContinueTaking: (item: T) => boolean): T[];
18
+ declare function takeRightWhile<T>(arr: readonly T[], shouldContinueTaking: (item: T) => boolean): T[];
19
19
 
20
20
  export { takeRightWhile };
@@ -15,6 +15,6 @@
15
15
  * // Returns []
16
16
  * takeRightWhile([1, 2, 3], n => n > 3);
17
17
  */
18
- declare function takeRightWhile<T>(arr: T[], shouldContinueTaking: (item: T) => boolean): T[];
18
+ declare function takeRightWhile<T>(arr: readonly T[], shouldContinueTaking: (item: T) => boolean): T[];
19
19
 
20
20
  export { takeRightWhile };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/takeRightWhile.ts"],"sourcesContent":["/**\n * Takes elements from the end of the array while the predicate function returns `true`.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {function(T): boolean} shouldContinueTaking - The function invoked per element.\n * @returns {T[]} A new array containing the elements taken from the end while the predicate returns `true`.\n *\n * @example\n * // Returns [3, 2, 1]\n * takeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n *\n * @example\n * // Returns []\n * takeRightWhile([1, 2, 3], n => n > 3);\n */\nexport function takeRightWhile<T>(arr: T[], shouldContinueTaking: (item: T) => boolean): T[] {\n for (let i = arr.length - 1; i >= 0; i--) {\n if (!shouldContinueTaking(arr[i])) {\n return arr.slice(i + 1);\n }\n }\n\n return arr.slice();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,eAAkB,KAAU,sBAAiD;AAC3F,WAAS,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK;AACxC,QAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC,GAAG;AACjC,aAAO,IAAI,MAAM,IAAI,CAAC;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,IAAI,MAAM;AACnB;","names":[]}
1
+ {"version":3,"sources":["../../src/array/takeRightWhile.ts"],"sourcesContent":["/**\n * Takes elements from the end of the array while the predicate function returns `true`.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {function(T): boolean} shouldContinueTaking - The function invoked per element.\n * @returns {T[]} A new array containing the elements taken from the end while the predicate returns `true`.\n *\n * @example\n * // Returns [3, 2, 1]\n * takeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n *\n * @example\n * // Returns []\n * takeRightWhile([1, 2, 3], n => n > 3);\n */\nexport function takeRightWhile<T>(arr: readonly T[], shouldContinueTaking: (item: T) => boolean): T[] {\n for (let i = arr.length - 1; i >= 0; i--) {\n if (!shouldContinueTaking(arr[i])) {\n return arr.slice(i + 1);\n }\n }\n\n return arr.slice();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,eAAkB,KAAmB,sBAAiD;AACpG,WAAS,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK;AACxC,QAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC,GAAG;AACjC,aAAO,IAAI,MAAM,IAAI,CAAC;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,IAAI,MAAM;AACnB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  takeRightWhile
3
- } from "../chunk-IFCX35BI.mjs";
3
+ } from "../chunk-NTLX2MPV.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  takeRightWhile
@@ -16,6 +16,6 @@
16
16
  * // Returns []
17
17
  * takeWhile([1, 2, 3, 4], x => x > 3);
18
18
  */
19
- declare function takeWhile<T>(arr: T[], shouldContinueTaking: (element: T) => boolean): T[];
19
+ declare function takeWhile<T>(arr: readonly T[], shouldContinueTaking: (element: T) => boolean): T[];
20
20
 
21
21
  export { takeWhile };
@@ -16,6 +16,6 @@
16
16
  * // Returns []
17
17
  * takeWhile([1, 2, 3, 4], x => x > 3);
18
18
  */
19
- declare function takeWhile<T>(arr: T[], shouldContinueTaking: (element: T) => boolean): T[];
19
+ declare function takeWhile<T>(arr: readonly T[], shouldContinueTaking: (element: T) => boolean): T[];
20
20
 
21
21
  export { takeWhile };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/takeWhile.ts"],"sourcesContent":["/**\n * Returns a new array containing the leading elements of the provided array\n * that satisfy the provided predicate function. It stops taking elements as soon\n * as an element does not satisfy the predicate.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @param {(element: T) => boolean} shouldContinueTaking - The predicate function that is called with each element. Elements are included in the result as long as this function returns true.\n * @returns {T[]} A new array containing the leading elements that satisfy the predicate.\n *\n * @example\n * // Returns [1, 2]\n * takeWhile([1, 2, 3, 4], x => x < 3);\n *\n * @example\n * // Returns []\n * takeWhile([1, 2, 3, 4], x => x > 3);\n */\nexport function takeWhile<T>(arr: T[], shouldContinueTaking: (element: T) => boolean): T[] {\n const result: T[] = [];\n\n for (const item of arr) {\n if (!shouldContinueTaking(item)) {\n break;\n }\n\n result.push(item);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBO,SAAS,UAAa,KAAU,sBAAoD;AACzF,QAAM,SAAc,CAAC;AAErB,aAAW,QAAQ,KAAK;AACtB,QAAI,CAAC,qBAAqB,IAAI,GAAG;AAC/B;AAAA,IACF;AAEA,WAAO,KAAK,IAAI;AAAA,EAClB;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/array/takeWhile.ts"],"sourcesContent":["/**\n * Returns a new array containing the leading elements of the provided array\n * that satisfy the provided predicate function. It stops taking elements as soon\n * as an element does not satisfy the predicate.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @param {(element: T) => boolean} shouldContinueTaking - The predicate function that is called with each element. Elements are included in the result as long as this function returns true.\n * @returns {T[]} A new array containing the leading elements that satisfy the predicate.\n *\n * @example\n * // Returns [1, 2]\n * takeWhile([1, 2, 3, 4], x => x < 3);\n *\n * @example\n * // Returns []\n * takeWhile([1, 2, 3, 4], x => x > 3);\n */\nexport function takeWhile<T>(arr: readonly T[], shouldContinueTaking: (element: T) => boolean): T[] {\n const result: T[] = [];\n\n for (const item of arr) {\n if (!shouldContinueTaking(item)) {\n break;\n }\n\n result.push(item);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBO,SAAS,UAAa,KAAmB,sBAAoD;AAClG,QAAM,SAAc,CAAC;AAErB,aAAW,QAAQ,KAAK;AACtB,QAAI,CAAC,qBAAqB,IAAI,GAAG;AAC/B;AAAA,IACF;AAEA,WAAO,KAAK,IAAI;AAAA,EAClB;AAEA,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  takeWhile
3
- } from "../chunk-LLOAPSQ6.mjs";
3
+ } from "../chunk-2IXFGSUA.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  takeWhile
@@ -14,6 +14,6 @@
14
14
  * const result = union(array1, array2);
15
15
  * // result will be [1, 2, 3, 4, 5]
16
16
  */
17
- declare function union<T>(arr1: T[], arr2: T[]): T[];
17
+ declare function union<T>(arr1: readonly T[], arr2: readonly T[]): T[];
18
18
 
19
19
  export { union };
@@ -14,6 +14,6 @@
14
14
  * const result = union(array1, array2);
15
15
  * // result will be [1, 2, 3, 4, 5]
16
16
  */
17
- declare function union<T>(arr1: T[], arr2: T[]): T[];
17
+ declare function union<T>(arr1: readonly T[], arr2: readonly T[]): T[];
18
18
 
19
19
  export { union };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/union.ts","../../src/array/uniq.ts"],"sourcesContent":["import { uniq } from './uniq';\n\n/**\n * Creates an array of unique values from all given arrays.\n *\n * This function takes two arrays, merges them into a single array, and returns a new array\n * containing only the unique values from the merged array.\n *\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @returns {T[]} A new array of unique values.\n *\n * @example\n * const array1 = [1, 2, 3];\n * const array2 = [3, 4, 5];\n * const result = union(array1, array2);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function union<T>(arr1: T[], arr2: T[]): T[] {\n return uniq(arr1.concat(arr2));\n}\n","/**\n * Creates a duplicate-free version of an array.\n *\n * This function takes an array and returns a new array containing only the unique values\n * from the original array, preserving the order of first occurrence.\n *\n * @param {T[]} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: T[]): T[] {\n return Array.from(new Set(arr));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,KAAQ,KAAe;AACrC,SAAO,MAAM,KAAK,IAAI,IAAI,GAAG,CAAC;AAChC;;;ADEO,SAAS,MAAS,MAAW,MAAgB;AAClD,SAAO,KAAK,KAAK,OAAO,IAAI,CAAC;AAC/B;","names":[]}
1
+ {"version":3,"sources":["../../src/array/union.ts","../../src/array/uniq.ts"],"sourcesContent":["import { uniq } from './uniq';\n\n/**\n * Creates an array of unique values from all given arrays.\n *\n * This function takes two arrays, merges them into a single array, and returns a new array\n * containing only the unique values from the merged array.\n *\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @returns {T[]} A new array of unique values.\n *\n * @example\n * const array1 = [1, 2, 3];\n * const array2 = [3, 4, 5];\n * const result = union(array1, array2);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function union<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n return uniq(arr1.concat(arr2));\n}\n","/**\n * Creates a duplicate-free version of an array.\n *\n * This function takes an array and returns a new array containing only the unique values\n * from the original array, preserving the order of first occurrence.\n *\n * @param {T[]} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: readonly T[]): T[] {\n return Array.from(new Set(arr));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,KAAQ,KAAwB;AAC9C,SAAO,MAAM,KAAK,IAAI,IAAI,GAAG,CAAC;AAChC;;;ADEO,SAAS,MAAS,MAAoB,MAAyB;AACpE,SAAO,KAAK,KAAK,OAAO,IAAI,CAAC;AAC/B;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  union
3
- } from "../chunk-XPOJM4E7.mjs";
4
- import "../chunk-5IY7KVTH.mjs";
3
+ } from "../chunk-DAJZ3JCI.mjs";
4
+ import "../chunk-XFCW7XJ4.mjs";
5
5
  import "../chunk-2MM5EJJX.mjs";
6
6
  export {
7
7
  union
@@ -18,6 +18,6 @@
18
18
  * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
19
19
  * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]
20
20
  */
21
- declare function unionBy<T, U>(arr1: T[], arr2: T[], mapper: (item: T) => U): T[];
21
+ declare function unionBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[];
22
22
 
23
23
  export { unionBy };
@@ -18,6 +18,6 @@
18
18
  * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
19
19
  * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]
20
20
  */
21
- declare function unionBy<T, U>(arr1: T[], arr2: T[], mapper: (item: T) => U): T[];
21
+ declare function unionBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[];
22
22
 
23
23
  export { unionBy };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/array/unionBy.ts"],"sourcesContent":["/**\n * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.\n *\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for numbers (modulo comparison)\n * const moduloMapper = (x) => x % 3;\n * unionBy([1, 2, 3], [4, 5, 6], moduloMapper);\n * // Returns [1, 2, 3]\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = (obj) => obj.id;\n * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]\n */\nexport function unionBy<T, U>(arr1: T[], arr2: T[], mapper: (item: T) => U): T[] {\n const map = new Map<U, T>();\n\n for (const item of [...arr1, ...arr2]) {\n const key = mapper(item);\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return [...map.values()];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,QAAc,MAAW,MAAW,QAA6B;AAC/E,QAAM,MAAM,oBAAI,IAAU;AAE1B,aAAW,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG;AACrC,UAAM,MAAM,OAAO,IAAI;AACvB,QAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AACjB,UAAI,IAAI,KAAK,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,CAAC,GAAG,IAAI,OAAO,CAAC;AACzB;","names":[]}
1
+ {"version":3,"sources":["../../src/array/unionBy.ts"],"sourcesContent":["/**\n * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.\n *\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for numbers (modulo comparison)\n * const moduloMapper = (x) => x % 3;\n * unionBy([1, 2, 3], [4, 5, 6], moduloMapper);\n * // Returns [1, 2, 3]\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = (obj) => obj.id;\n * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]\n */\nexport function unionBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[] {\n const map = new Map<U, T>();\n\n for (const item of [...arr1, ...arr2]) {\n const key = mapper(item);\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return [...map.values()];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,QAAc,MAAoB,MAAoB,QAA6B;AACjG,QAAM,MAAM,oBAAI,IAAU;AAE1B,aAAW,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG;AACrC,UAAM,MAAM,OAAO,IAAI;AACvB,QAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AACjB,UAAI,IAAI,KAAK,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,CAAC,GAAG,IAAI,OAAO,CAAC;AACzB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unionBy
3
- } from "../chunk-LIXL7PEP.mjs";
3
+ } from "../chunk-JBDGK6X4.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  unionBy
@@ -17,6 +17,6 @@
17
17
  * const result = unionWith(array1, array2, areItemsEqual);
18
18
  * // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays
19
19
  */
20
- declare function unionWith<T>(arr1: T[], arr2: T[], areItemsEqual: (item1: T, item2: T) => boolean): T[];
20
+ declare function unionWith<T>(arr1: readonly T[], arr2: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[];
21
21
 
22
22
  export { unionWith };
@@ -17,6 +17,6 @@
17
17
  * const result = unionWith(array1, array2, areItemsEqual);
18
18
  * // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays
19
19
  */
20
- declare function unionWith<T>(arr1: T[], arr2: T[], areItemsEqual: (item1: T, item2: T) => boolean): T[];
20
+ declare function unionWith<T>(arr1: readonly T[], arr2: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[];
21
21
 
22
22
  export { unionWith };