@oscarpalmer/atoms 0.162.0 → 0.164.0

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 (290) hide show
  1. package/{types/array/difference.d.ts → dist/array/difference.d.mts} +8 -4
  2. package/dist/array/{difference.js → difference.mjs} +1 -1
  3. package/{types/array/exists.d.ts → dist/array/exists.d.mts} +9 -5
  4. package/dist/array/{exists.js → exists.mjs} +1 -1
  5. package/{types/array/filter.d.ts → dist/array/filter.d.mts} +11 -8
  6. package/dist/array/{filter.js → filter.mjs} +1 -1
  7. package/{types/array/find.d.ts → dist/array/find.d.mts} +9 -5
  8. package/dist/array/{find.js → find.mjs} +1 -1
  9. package/dist/array/flatten.d.mts +11 -0
  10. package/{types/array/from.d.ts → dist/array/from.d.mts} +9 -6
  11. package/{types/array/get.d.ts → dist/array/get.d.mts} +10 -6
  12. package/dist/array/{get.js → get.mjs} +1 -1
  13. package/{types/array/group-by.d.ts → dist/array/group-by.d.mts} +14 -11
  14. package/dist/array/{group-by.js → group-by.mjs} +1 -1
  15. package/dist/array/index.d.mts +27 -0
  16. package/dist/array/index.mjs +27 -0
  17. package/{types/array/insert.d.ts → dist/array/insert.d.mts} +5 -2
  18. package/dist/array/{insert.js → insert.mjs} +1 -1
  19. package/{types/array/intersection.d.ts → dist/array/intersection.d.mts} +6 -3
  20. package/dist/array/{intersection.js → intersection.mjs} +1 -1
  21. package/{types/array/move.d.ts → dist/array/move.d.mts} +11 -8
  22. package/dist/array/{move.js → move.mjs} +2 -2
  23. package/{types/array/partition.d.ts → dist/array/partition.d.mts} +9 -5
  24. package/dist/array/{partition.js → partition.mjs} +1 -1
  25. package/{types/array/position.d.ts → dist/array/position.d.mts} +21 -17
  26. package/dist/array/{position.js → position.mjs} +12 -12
  27. package/{types/array/push.d.ts → dist/array/push.d.mts} +4 -1
  28. package/dist/array/{push.js → push.mjs} +1 -1
  29. package/dist/array/select.d.mts +47 -0
  30. package/dist/array/{select.js → select.mjs} +1 -1
  31. package/{types/array/slice.d.ts → dist/array/slice.d.mts} +16 -12
  32. package/dist/array/{slice.js → slice.mjs} +3 -3
  33. package/{types/array/sort.d.ts → dist/array/sort.d.mts} +41 -37
  34. package/dist/array/{sort.js → sort.mjs} +4 -4
  35. package/{types/array/splice.d.ts → dist/array/splice.d.mts} +7 -4
  36. package/dist/array/{splice.js → splice.mjs} +1 -1
  37. package/{types/array/swap.d.ts → dist/array/swap.d.mts} +13 -10
  38. package/dist/array/{swap.js → swap.mjs} +4 -4
  39. package/{types/array/to-map.d.ts → dist/array/to-map.d.mts} +14 -11
  40. package/dist/array/{to-map.js → to-map.mjs} +1 -1
  41. package/{types/array/to-record.d.ts → dist/array/to-record.d.mts} +14 -11
  42. package/dist/array/{to-record.js → to-record.mjs} +1 -1
  43. package/dist/array/to-set.d.mts +25 -0
  44. package/dist/array/{to-set.js → to-set.mjs} +1 -1
  45. package/{types/array/toggle.d.ts → dist/array/toggle.d.mts} +8 -4
  46. package/dist/array/{toggle.js → toggle.mjs} +1 -1
  47. package/{types/array/union.d.ts → dist/array/union.d.mts} +6 -3
  48. package/dist/array/{union.js → union.mjs} +1 -1
  49. package/{types/array/unique.d.ts → dist/array/unique.d.mts} +8 -4
  50. package/dist/array/{unique.js → unique.mjs} +1 -1
  51. package/{types/array/update.d.ts → dist/array/update.d.mts} +8 -4
  52. package/dist/array/{update.js → update.mjs} +1 -1
  53. package/dist/beacon.d.mts +116 -0
  54. package/dist/{beacon.js → beacon.mjs} +6 -6
  55. package/dist/color/constants.d.mts +38 -0
  56. package/dist/color/constants.mjs +55 -0
  57. package/dist/color/index.d.mts +17 -0
  58. package/dist/color/{index.js → index.mjs} +6 -6
  59. package/dist/color/instance.d.mts +70 -0
  60. package/dist/color/{instance.js → instance.mjs} +4 -4
  61. package/dist/color/misc/alpha.d.mts +8 -0
  62. package/dist/color/misc/{alpha.js → alpha.mjs} +1 -1
  63. package/dist/color/misc/get.d.mts +51 -0
  64. package/dist/color/misc/{get.js → get.mjs} +4 -4
  65. package/dist/color/misc/index.d.mts +7 -0
  66. package/dist/color/misc/{index.js → index.mjs} +4 -4
  67. package/{types/color/misc/is.d.ts → dist/color/misc/is.d.mts} +14 -10
  68. package/dist/color/misc/{is.js → is.mjs} +3 -3
  69. package/dist/color/misc/state.d.mts +9 -0
  70. package/dist/color/misc/{state.js → state.mjs} +7 -7
  71. package/dist/color/models.d.mts +30 -0
  72. package/dist/color/models.mjs +1 -0
  73. package/dist/color/space/hex.d.mts +26 -0
  74. package/dist/color/space/{hex.js → hex.mjs} +4 -4
  75. package/dist/color/space/hsl.d.mts +23 -0
  76. package/dist/color/space/{hsl.js → hsl.mjs} +5 -5
  77. package/dist/color/space/rgb.d.mts +31 -0
  78. package/dist/color/space/{rgb.js → rgb.mjs} +5 -5
  79. package/{types/function/assert.d.ts → dist/function/assert.d.mts} +12 -9
  80. package/dist/function/{assert.js → assert.mjs} +1 -1
  81. package/{types/function/index.d.ts → dist/function/index.d.mts} +10 -6
  82. package/dist/function/{index.js → index.mjs} +4 -4
  83. package/dist/function/memoize.d.mts +73 -0
  84. package/dist/function/{memoize.js → memoize.mjs} +5 -5
  85. package/{types/function/once.d.ts → dist/function/once.d.mts} +8 -5
  86. package/dist/function/{once.js → once.mjs} +3 -3
  87. package/{types/function/retry.d.ts → dist/function/retry.d.mts} +15 -12
  88. package/dist/function/{retry.js → retry.mjs} +5 -5
  89. package/{types/function/work.d.ts → dist/function/work.d.mts} +36 -33
  90. package/dist/function/{work.js → work.mjs} +9 -9
  91. package/dist/index.d.mts +4253 -0
  92. package/dist/{atoms.full.js → index.mjs} +223 -20
  93. package/dist/internal/array/callbacks.d.mts +12 -0
  94. package/{types/internal/array/chunk.d.ts → dist/internal/array/chunk.d.mts} +4 -1
  95. package/dist/internal/array/{chunk.js → chunk.mjs} +1 -1
  96. package/{types/internal/array/compact.d.ts → dist/internal/array/compact.d.mts} +5 -2
  97. package/dist/internal/array/find.d.mts +15 -0
  98. package/dist/internal/array/{find.js → find.mjs} +6 -6
  99. package/dist/internal/array/group.d.mts +6 -0
  100. package/dist/internal/array/{group.js → group.mjs} +1 -1
  101. package/{types/internal/array/index-of.d.ts → dist/internal/array/index-of.d.mts} +9 -5
  102. package/dist/internal/array/{index-of.js → index-of.mjs} +1 -1
  103. package/dist/internal/array/insert.d.mts +8 -0
  104. package/dist/internal/array/{insert.js → insert.mjs} +4 -4
  105. package/dist/internal/array/overlap.d.mts +13 -0
  106. package/dist/internal/array/sets.d.mts +8 -0
  107. package/dist/internal/array/{sets.js → sets.mjs} +4 -4
  108. package/dist/internal/array/shuffle.d.mts +9 -0
  109. package/dist/internal/array/{shuffle.js → shuffle.mjs} +1 -1
  110. package/dist/internal/array/update.d.mts +4 -0
  111. package/dist/internal/array/{update.js → update.mjs} +1 -1
  112. package/dist/internal/function/misc.d.mts +7 -0
  113. package/dist/internal/function/timer.d.mts +10 -0
  114. package/dist/internal/function/{timer.js → timer.mjs} +4 -4
  115. package/{types/internal/is.d.ts → dist/internal/is.d.mts} +12 -8
  116. package/dist/internal/{is.js → is.mjs} +1 -1
  117. package/dist/internal/math/aggregate.d.mts +38 -0
  118. package/dist/internal/math/{aggregate.js → aggregate.mjs} +6 -6
  119. package/{types/internal/number.d.ts → dist/internal/number.d.mts} +6 -3
  120. package/dist/internal/{number.js → number.mjs} +7 -7
  121. package/{types/internal/random.d.ts → dist/internal/random.d.mts} +5 -2
  122. package/dist/internal/{random.js → random.mjs} +1 -1
  123. package/{types/internal/result.d.ts → dist/internal/result.d.mts} +11 -7
  124. package/dist/internal/{result.js → result.mjs} +3 -3
  125. package/dist/internal/sized.d.mts +4 -0
  126. package/dist/internal/{sized.js → sized.mjs} +3 -3
  127. package/dist/internal/string.d.mts +25 -0
  128. package/dist/internal/{string.js → string.mjs} +3 -3
  129. package/{types/internal/value/compare.d.ts → dist/internal/value/compare.d.mts} +14 -11
  130. package/dist/internal/value/{compare.js → compare.mjs} +5 -5
  131. package/dist/internal/value/equal.d.mts +85 -0
  132. package/dist/internal/value/{equal.js → equal.mjs} +7 -7
  133. package/{types/internal/value/get.d.ts → dist/internal/value/get.d.mts} +7 -3
  134. package/dist/internal/value/{get.js → get.mjs} +1 -1
  135. package/dist/internal/value/handlers.d.mts +19 -0
  136. package/dist/internal/value/{handlers.js → handlers.mjs} +1 -1
  137. package/{types/internal/value/has.d.ts → dist/internal/value/has.d.mts} +12 -9
  138. package/dist/internal/value/{has.js → has.mjs} +1 -1
  139. package/dist/internal/value/misc.d.mts +14 -0
  140. package/dist/internal/value/{misc.js → misc.mjs} +4 -4
  141. package/dist/internal/value/partial.d.mts +5 -0
  142. package/{types/internal/value/set.d.ts → dist/internal/value/set.d.mts} +8 -4
  143. package/dist/internal/value/{set.js → set.mjs} +2 -2
  144. package/{types/is.d.ts → dist/is.d.mts} +14 -10
  145. package/dist/{is.js → is.mjs} +5 -5
  146. package/dist/logger.d.mts +67 -0
  147. package/dist/{logger.js → logger.mjs} +3 -3
  148. package/{types/math.d.ts → dist/math.d.mts} +24 -20
  149. package/dist/{math.js → math.mjs} +2 -2
  150. package/dist/models.d.mts +138 -0
  151. package/dist/models.mjs +1 -0
  152. package/dist/number.d.mts +2 -0
  153. package/dist/number.mjs +2 -0
  154. package/{types/promise/delay.d.ts → dist/promise/delay.d.mts} +7 -3
  155. package/dist/promise/{delay.js → delay.mjs} +4 -4
  156. package/dist/promise/helpers.d.mts +23 -0
  157. package/dist/promise/{helpers.js → helpers.mjs} +3 -3
  158. package/{types/promise/index.d.ts → dist/promise/index.d.mts} +22 -19
  159. package/dist/promise/{index.js → index.mjs} +9 -9
  160. package/dist/promise/misc.d.mts +26 -0
  161. package/dist/promise/{misc.js → misc.mjs} +2 -2
  162. package/dist/promise/models.d.mts +84 -0
  163. package/dist/promise/models.mjs +38 -0
  164. package/dist/promise/timed.d.mts +21 -0
  165. package/dist/promise/{timed.js → timed.mjs} +5 -4
  166. package/{types/query.d.ts → dist/query.d.mts} +7 -3
  167. package/dist/{query.js → query.mjs} +8 -8
  168. package/dist/queue.d.mts +103 -0
  169. package/dist/{queue.js → queue.mjs} +18 -17
  170. package/{types/random.d.ts → dist/random.d.mts} +12 -8
  171. package/dist/{random.js → random.mjs} +7 -7
  172. package/{types/result/index.d.ts → dist/result/index.d.mts} +20 -17
  173. package/dist/result/{index.js → index.mjs} +7 -7
  174. package/{types/result/match.d.ts → dist/result/match.d.mts} +9 -6
  175. package/dist/result/{match.js → match.mjs} +2 -2
  176. package/{types/result/misc.d.ts → dist/result/misc.d.mts} +13 -9
  177. package/dist/result/{misc.js → misc.mjs} +2 -2
  178. package/dist/result/models.d.mts +63 -0
  179. package/dist/result/models.mjs +1 -0
  180. package/{types/result/work/flow.d.ts → dist/result/work/flow.d.mts} +22 -19
  181. package/dist/result/work/{flow.js → flow.mjs} +3 -3
  182. package/{types/result/work/pipe.d.ts → dist/result/work/pipe.d.mts} +30 -27
  183. package/dist/result/work/{pipe.js → pipe.mjs} +3 -3
  184. package/dist/sized/map.d.mts +46 -0
  185. package/dist/sized/{map.js → map.mjs} +1 -1
  186. package/dist/sized/set.d.mts +45 -0
  187. package/dist/sized/{set.js → set.mjs} +1 -1
  188. package/{types/string/case.d.ts → dist/string/case.d.mts} +11 -8
  189. package/dist/string/{case.js → case.mjs} +17 -17
  190. package/{types/string/index.d.ts → dist/string/index.d.mts} +9 -5
  191. package/dist/string/{index.js → index.mjs} +2 -2
  192. package/{types/string/match.d.ts → dist/string/match.d.mts} +6 -3
  193. package/dist/string/{match.js → match.mjs} +5 -5
  194. package/{types/string/template.d.ts → dist/string/template.d.mts} +17 -14
  195. package/dist/string/{template.js → template.mjs} +4 -4
  196. package/{types/value/clone.d.ts → dist/value/clone.d.mts} +14 -11
  197. package/dist/value/{clone.js → clone.mjs} +4 -4
  198. package/dist/value/diff.d.mts +53 -0
  199. package/dist/value/{diff.js → diff.mjs} +6 -6
  200. package/dist/value/handle.d.mts +4 -0
  201. package/dist/value/handle.mjs +4 -0
  202. package/dist/value/index.d.mts +5 -0
  203. package/dist/value/index.mjs +5 -0
  204. package/dist/value/merge.d.mts +54 -0
  205. package/dist/value/{merge.js → merge.mjs} +2 -2
  206. package/dist/value/omit.d.mts +12 -0
  207. package/dist/value/{omit.js → omit.mjs} +1 -1
  208. package/dist/value/pick.d.mts +12 -0
  209. package/dist/value/{pick.js → pick.mjs} +1 -1
  210. package/dist/value/smush.d.mts +12 -0
  211. package/dist/value/{smush.js → smush.mjs} +3 -3
  212. package/dist/value/unsmush.d.mts +20 -0
  213. package/dist/value/{unsmush.js → unsmush.mjs} +2 -2
  214. package/package.json +103 -105
  215. package/src/models.ts +2 -2
  216. package/src/promise/index.ts +14 -7
  217. package/src/promise/models.ts +26 -5
  218. package/src/promise/timed.ts +2 -0
  219. package/src/queue.ts +23 -13
  220. package/dist/array/index.js +0 -27
  221. package/dist/color/constants.js +0 -55
  222. package/dist/color/models.js +0 -0
  223. package/dist/index.js +0 -83
  224. package/dist/models.js +0 -0
  225. package/dist/number.js +0 -2
  226. package/dist/promise/models.js +0 -39
  227. package/dist/result/models.js +0 -0
  228. package/dist/value/handle.js +0 -4
  229. package/dist/value/index.js +0 -5
  230. package/types/array/flatten.d.ts +0 -7
  231. package/types/array/index.d.ts +0 -26
  232. package/types/array/select.d.ts +0 -43
  233. package/types/array/to-set.d.ts +0 -21
  234. package/types/beacon.d.ts +0 -114
  235. package/types/color/constants.d.ts +0 -34
  236. package/types/color/index.d.ts +0 -14
  237. package/types/color/instance.d.ts +0 -66
  238. package/types/color/misc/alpha.d.ts +0 -4
  239. package/types/color/misc/get.d.ts +0 -47
  240. package/types/color/misc/index.d.ts +0 -3
  241. package/types/color/misc/state.d.ts +0 -5
  242. package/types/color/models.d.ts +0 -28
  243. package/types/color/space/hex.d.ts +0 -22
  244. package/types/color/space/hsl.d.ts +0 -19
  245. package/types/color/space/rgb.d.ts +0 -27
  246. package/types/function/memoize.d.ts +0 -70
  247. package/types/index.d.ts +0 -37
  248. package/types/internal/array/callbacks.d.ts +0 -8
  249. package/types/internal/array/find.d.ts +0 -13
  250. package/types/internal/array/group.d.ts +0 -2
  251. package/types/internal/array/insert.d.ts +0 -6
  252. package/types/internal/array/overlap.d.ts +0 -11
  253. package/types/internal/array/sets.d.ts +0 -6
  254. package/types/internal/array/shuffle.d.ts +0 -6
  255. package/types/internal/array/update.d.ts +0 -1
  256. package/types/internal/function/misc.d.ts +0 -4
  257. package/types/internal/function/timer.d.ts +0 -7
  258. package/types/internal/math/aggregate.d.ts +0 -35
  259. package/types/internal/sized.d.ts +0 -1
  260. package/types/internal/string.d.ts +0 -22
  261. package/types/internal/value/equal.d.ts +0 -82
  262. package/types/internal/value/handlers.d.ts +0 -16
  263. package/types/internal/value/misc.d.ts +0 -11
  264. package/types/internal/value/partial.d.ts +0 -2
  265. package/types/logger.d.ts +0 -65
  266. package/types/models.d.ts +0 -150
  267. package/types/number.d.ts +0 -1
  268. package/types/promise/helpers.d.ts +0 -19
  269. package/types/promise/misc.d.ts +0 -22
  270. package/types/promise/models.d.ts +0 -85
  271. package/types/promise/timed.d.ts +0 -17
  272. package/types/queue.d.ts +0 -100
  273. package/types/result/models.d.ts +0 -60
  274. package/types/sized/map.d.ts +0 -43
  275. package/types/sized/set.d.ts +0 -42
  276. package/types/value/diff.d.ts +0 -51
  277. package/types/value/handle.d.ts +0 -3
  278. package/types/value/index.d.ts +0 -4
  279. package/types/value/merge.d.ts +0 -51
  280. package/types/value/omit.d.ts +0 -8
  281. package/types/value/pick.d.ts +0 -8
  282. package/types/value/smush.d.ts +0 -10
  283. package/types/value/unsmush.d.ts +0 -19
  284. /package/dist/array/{flatten.js → flatten.mjs} +0 -0
  285. /package/dist/array/{from.js → from.mjs} +0 -0
  286. /package/dist/internal/array/{callbacks.js → callbacks.mjs} +0 -0
  287. /package/dist/internal/array/{compact.js → compact.mjs} +0 -0
  288. /package/dist/internal/array/{overlap.js → overlap.mjs} +0 -0
  289. /package/dist/internal/function/{misc.js → misc.mjs} +0 -0
  290. /package/dist/internal/value/{partial.js → partial.mjs} +0 -0
@@ -1,4 +1,6 @@
1
- import type { PlainObject } from '../models';
1
+ import { PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/difference.d.ts
2
4
  /**
3
5
  * Get the items from the first array that are not in the second array
4
6
  * @param first First array
@@ -6,7 +8,7 @@ import type { PlainObject } from '../models';
6
8
  * @param callback Callback to get an item's value for comparison
7
9
  * @returns Unique values from the first array
8
10
  */
9
- export declare function difference<First, Second>(first: First[], second: Second[], callback: (item: First | Second) => unknown): First[];
11
+ declare function difference<First, Second>(first: First[], second: Second[], callback: (item: First | Second) => unknown): First[];
10
12
  /**
11
13
  * Get the items from the first array that are not in the second array
12
14
  * @param first First array
@@ -14,11 +16,13 @@ export declare function difference<First, Second>(first: First[], second: Second
14
16
  * @param key Key to get an item's value for comparison
15
17
  * @returns Unique values from the first array
16
18
  */
17
- export declare function difference<First extends PlainObject, Second extends PlainObject, Key extends keyof First & keyof Second>(first: First[], second: Second[], key: Key): First[];
19
+ declare function difference<First extends PlainObject, Second extends PlainObject, Key extends keyof First & keyof Second>(first: First[], second: Second[], key: Key): First[];
18
20
  /**
19
21
  * Get the items from the first array that are not in the second array
20
22
  * @param first First array
21
23
  * @param second Second array
22
24
  * @returns Unique values from the first array
23
25
  */
24
- export declare function difference<First, Second>(first: First[], second: Second[]): First[];
26
+ declare function difference<First, Second>(first: First[], second: Second[]): First[];
27
+ //#endregion
28
+ export { difference };
@@ -1,4 +1,4 @@
1
- import { COMPARE_SETS_DIFFERENCE, compareSets } from "../internal/array/sets.js";
1
+ import { COMPARE_SETS_DIFFERENCE, compareSets } from "../internal/array/sets.mjs";
2
2
  //#region src/array/difference.ts
3
3
  function difference(first, second, key) {
4
4
  return compareSets(COMPARE_SETS_DIFFERENCE, first, second, key);
@@ -1,4 +1,6 @@
1
- import type { PlainObject } from '../models';
1
+ import { PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/exists.d.ts
2
4
  /**
3
5
  * Does an item with a specific value exist in the array?
4
6
  * @param array Array to search in
@@ -6,7 +8,7 @@ import type { PlainObject } from '../models';
6
8
  * @param value Value to match against
7
9
  * @returns `true` if the item exists in the array, otherwise `false`
8
10
  */
9
- export declare function exists<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): boolean;
11
+ declare function exists<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): boolean;
10
12
  /**
11
13
  * Does an item with a specific value exist in the array?
12
14
  * @param array Array to search in
@@ -14,18 +16,20 @@ export declare function exists<Item, Callback extends (item: Item, index: number
14
16
  * @param value Value to match against
15
17
  * @returns `true` if the item exists in the array, otherwise `false`
16
18
  */
17
- export declare function exists<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): boolean;
19
+ declare function exists<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): boolean;
18
20
  /**
19
21
  * Does an item in the array match the filter?
20
22
  * @param array Array to search in
21
23
  * @param filter Filter callback to match items
22
24
  * @returns `true` if a matching item exists, otherwise `false`
23
25
  */
24
- export declare function exists<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): boolean;
26
+ declare function exists<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): boolean;
25
27
  /**
26
28
  * Does the item exist in the array?
27
29
  * @param array Array to search in
28
30
  * @param item Item to search for
29
31
  * @returns `true` if the item exists in the array, otherwise `false`
30
32
  */
31
- export declare function exists<Item>(array: Item[], item: Item): boolean;
33
+ declare function exists<Item>(array: Item[], item: Item): boolean;
34
+ //#endregion
35
+ export { exists };
@@ -1,4 +1,4 @@
1
- import { FIND_VALUE_INDEX, findValue } from "../internal/array/find.js";
1
+ import { FIND_VALUE_INDEX, findValue } from "../internal/array/find.mjs";
2
2
  //#region src/array/exists.ts
3
3
  function exists(array, ...parameters) {
4
4
  if (parameters.length === 1 && typeof parameters[0] !== "function") return Array.isArray(array) ? array.includes(parameters[0]) : false;
@@ -1,4 +1,6 @@
1
- import type { PlainObject } from '../models';
1
+ import { PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/filter.d.ts
2
4
  /**
3
5
  * Get a filtered array of items
4
6
  * @param array Array to search in
@@ -6,7 +8,7 @@ import type { PlainObject } from '../models';
6
8
  * @param value Value to match against
7
9
  * @returns Filtered array of items
8
10
  */
9
- export declare function filter<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item[];
11
+ declare function filter<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item[];
10
12
  /**
11
13
  * Get a filtered array of items
12
14
  * @param array Array to search in
@@ -14,26 +16,27 @@ export declare function filter<Item, Callback extends (item: Item, index: number
14
16
  * @param value Value to match against
15
17
  * @returns Filtered array of items
16
18
  */
17
- export declare function filter<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): Item[];
19
+ declare function filter<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): Item[];
18
20
  /**
19
21
  * Get a filtered array of items matching the filter
20
22
  * @param array Array to search in
21
23
  * @param filter Filter callback to match items
22
24
  * @returns Filtered array of items
23
25
  */
24
- export declare function filter<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item[];
26
+ declare function filter<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item[];
25
27
  /**
26
28
  * Get a filtered array of items matching the given item
27
29
  * @param array Array to search in
28
30
  * @param item Item to match against
29
31
  * @returns Filtered array of items
30
32
  */
31
- export declare function filter<Item>(array: Item[], item: Item): Item[];
32
- export declare namespace filter {
33
- var remove: typeof removeFiltered;
33
+ declare function filter<Item>(array: Item[], item: Item): Item[];
34
+ declare namespace filter {
35
+ var remove: typeof removeFiltered;
34
36
  }
35
37
  declare function removeFiltered<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): unknown[];
36
38
  declare function removeFiltered<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): unknown[];
37
39
  declare function removeFiltered<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): unknown[];
38
40
  declare function removeFiltered<Item>(array: Item[], item: Item): unknown[];
39
- export {};
41
+ //#endregion
42
+ export { filter };
@@ -1,4 +1,4 @@
1
- import { findValues } from "../internal/array/find.js";
1
+ import { findValues } from "../internal/array/find.mjs";
2
2
  //#region src/array/filter.ts
3
3
  function filter(array, ...parameters) {
4
4
  return findValues("all", array, parameters).matched;
@@ -1,4 +1,6 @@
1
- import type { PlainObject } from '../models';
1
+ import { PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/find.d.ts
2
4
  /**
3
5
  * Get the first items matching the given value
4
6
  * @param array Array to search in
@@ -6,7 +8,7 @@ import type { PlainObject } from '../models';
6
8
  * @param value Value to match against
7
9
  * @returns First item that matches the value, or `undefined` if no match is found
8
10
  */
9
- export declare function find<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item | undefined;
11
+ declare function find<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item | undefined;
10
12
  /**
11
13
  * Get the first item matching the given value by key
12
14
  * @param array Array to search in
@@ -14,18 +16,20 @@ export declare function find<Item, Callback extends (item: Item, index: number,
14
16
  * @param value Value to match against
15
17
  * @returns First item that matches the value, or `undefined` if no match is found
16
18
  */
17
- export declare function find<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): Item | undefined;
19
+ declare function find<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): Item | undefined;
18
20
  /**
19
21
  * Get the first item matching the filter
20
22
  * @param array Array to search in
21
23
  * @param filter Filter callback to match items
22
24
  * @returns First item that matches the filter, or `undefined` if no match is found
23
25
  */
24
- export declare function find<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item | undefined;
26
+ declare function find<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item | undefined;
25
27
  /**
26
28
  * Get the first item matching the given value
27
29
  * @param array Array to search in
28
30
  * @param value Value to match against
29
31
  * @returns First item that matches the value, or `undefined` if no match is found
30
32
  */
31
- export declare function find<Item>(array: Item[], value: Item): Item | undefined;
33
+ declare function find<Item>(array: Item[], value: Item): Item | undefined;
34
+ //#endregion
35
+ export { find };
@@ -1,4 +1,4 @@
1
- import { FIND_VALUE_VALUE, findValue } from "../internal/array/find.js";
1
+ import { FIND_VALUE_VALUE, findValue } from "../internal/array/find.mjs";
2
2
  //#region src/array/find.ts
3
3
  function find(array, ...parameters) {
4
4
  return findValue(FIND_VALUE_VALUE, array, parameters);
@@ -0,0 +1,11 @@
1
+ import { NestedArray } from "../models.mjs";
2
+
3
+ //#region src/array/flatten.d.ts
4
+ /**
5
+ * Flatten an array _(using native `flat` and maximum depth)_
6
+ * @param array Array to flatten
7
+ * @returns Flattened array
8
+ */
9
+ declare function flatten<Item>(array: Item[]): NestedArray<Item>[];
10
+ //#endregion
11
+ export { flatten };
@@ -1,16 +1,17 @@
1
+ //#region src/array/from.d.ts
1
2
  /**
2
3
  * Get an array with a specified length, filled with indices
3
4
  * @param length Length of the array
4
5
  * @returns Array of indices
5
6
  */
6
- export declare function range(length: number): number[];
7
+ declare function range(length: number): number[];
7
8
  /**
8
9
  * Get an array of numbers in a specified range
9
10
  * @param start Starting number _(inclusive)_
10
11
  * @param end Ending number _(exclusive)_
11
12
  * @returns Array of numbers in range
12
13
  */
13
- export declare function range(start: number, end: number): number[];
14
+ declare function range(start: number, end: number): number[];
14
15
  /**
15
16
  * Get an array of numbers in a specified range with a specified step
16
17
  * @param start Starting number _(inclusive)_
@@ -18,24 +19,26 @@ export declare function range(start: number, end: number): number[];
18
19
  * @param step Step between numbers
19
20
  * @returns Array of numbers in range
20
21
  */
21
- export declare function range(start: number, end: number, step: number): number[];
22
+ declare function range(start: number, end: number, step: number): number[];
22
23
  /**
23
24
  * Get an array with a specified length, filled with indices
24
25
  * @param length Length of the array
25
26
  * @returns Array of indices
26
27
  */
27
- export declare function times(length: number): number[];
28
+ declare function times(length: number): number[];
28
29
  /**
29
30
  * Get an array with a specified length, filled by values from a callback
30
31
  * @param length Length of the array
31
32
  * @param callback Callback function to generate values
32
33
  * @returns Array of values generated by the callback
33
34
  */
34
- export declare function times<Callback extends (index: number) => unknown>(length: number, callback: Callback): ReturnType<Callback>[];
35
+ declare function times<Callback extends (index: number) => unknown>(length: number, callback: Callback): ReturnType<Callback>[];
35
36
  /**
36
37
  * Get an array with a specified length, filled with a specified value
37
38
  * @param length Length of the array
38
39
  * @param value Value to fill the array with
39
40
  * @returns Array filled with the specified value
40
41
  */
41
- export declare function times<Value>(length: number, value: Value): Value[];
42
+ declare function times<Value>(length: number, value: Value): Value[];
43
+ //#endregion
44
+ export { range, times };
@@ -1,31 +1,35 @@
1
- import type { NumericalKeys, PlainObject } from '../models';
1
+ import { NumericalKeys, PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/get.d.ts
2
4
  /**
3
5
  * Get an array from an object, where only values with numerical keys will be included
4
6
  * @param value Object to convert to an array
5
7
  * @returns Array holding the values of the object's numerical keys
6
8
  */
7
- export declare function getArray<Value extends PlainObject>(value: Value, indiced: true): Value[NumericalKeys<Value>][];
9
+ declare function getArray<Value extends PlainObject>(value: Value, indiced: true): Value[NumericalKeys<Value>][];
8
10
  /**
9
11
  * Get an array from an object
10
12
  * @param value Object to convert to an array
11
13
  * @returns Array holding the values of the object
12
14
  */
13
- export declare function getArray<Value extends PlainObject>(value: Value): Value[keyof Value][];
15
+ declare function getArray<Value extends PlainObject>(value: Value): Value[keyof Value][];
14
16
  /**
15
17
  * Get an array
16
18
  * @param value Original array
17
19
  * @returns Original array
18
20
  */
19
- export declare function getArray<Item>(value: Item[]): Item[];
21
+ declare function getArray<Item>(value: Item[]): Item[];
20
22
  /**
21
23
  * Get an array from a value
22
24
  * @param value Value to convert to an array
23
25
  * @returns Array holding the value
24
26
  */
25
- export declare function getArray<Item>(value: Item): Item[];
27
+ declare function getArray<Item>(value: Item): Item[];
26
28
  /**
27
29
  * Get an array from an unknown value
28
30
  * @param value Value to convert to an array
29
31
  * @returns Array of value
30
32
  */
31
- export declare function getArray(value: unknown): unknown[];
33
+ declare function getArray(value: unknown): unknown[];
34
+ //#endregion
35
+ export { getArray };
@@ -1,4 +1,4 @@
1
- import { isPlainObject } from "../internal/is.js";
1
+ import { isPlainObject } from "../internal/is.mjs";
2
2
  //#region src/array/get.ts
3
3
  function getArray(value, indiced) {
4
4
  if (Array.isArray(value)) return value;
@@ -1,4 +1,6 @@
1
- import type { Key, KeyedValue, PlainObject, Simplify } from '../models';
1
+ import { Key, KeyedValue, PlainObject, Simplify } from "../models.mjs";
2
+
3
+ //#region src/array/group-by.d.ts
2
4
  /**
3
5
  * Create a record from an array of items using a specific key and value
4
6
  *
@@ -8,7 +10,7 @@ import type { Key, KeyedValue, PlainObject, Simplify } from '../models';
8
10
  * @param value Callback to get an item's value
9
11
  * @returns Record of keyed values
10
12
  */
11
- export declare function groupBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Simplify<Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>>>;
13
+ declare function groupBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Simplify<Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>>>;
12
14
  /**
13
15
  * Create a record from an array of items using a specific key and value
14
16
  *
@@ -18,7 +20,7 @@ export declare function groupBy<Item, KeyCallback extends (item: Item, index: nu
18
20
  * @param value Key to use for value
19
21
  * @returns Record of keyed values
20
22
  */
21
- export declare function groupBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue]>;
23
+ declare function groupBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue]>;
22
24
  /**
23
25
  * Create a record from an array of items using a specific key and value
24
26
  *
@@ -28,7 +30,7 @@ export declare function groupBy<Item extends PlainObject, KeyCallback extends (i
28
30
  * @param value Callback to get an item's value
29
31
  * @returns Record of keyed values
30
32
  */
31
- export declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: ItemKey, value: ValueCallback): Simplify<Record<KeyedValue<Item, ItemKey>, ReturnType<ValueCallback>>>;
33
+ declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: ItemKey, value: ValueCallback): Simplify<Record<KeyedValue<Item, ItemKey>, ReturnType<ValueCallback>>>;
32
34
  /**
33
35
  * Create a record from an array of items using a specific key and value
34
36
  *
@@ -38,7 +40,7 @@ export declare function groupBy<Item extends PlainObject, ItemKey extends keyof
38
40
  * @param value Key to use for value
39
41
  * @returns Record of keyed values
40
42
  */
41
- export declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item, ItemValue extends keyof Item>(array: Item[], key: ItemKey, value: ItemValue): Simplify<Record<KeyedValue<Item, ItemKey>, Item[ItemValue]>>;
43
+ declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item, ItemValue extends keyof Item>(array: Item[], key: ItemKey, value: ItemValue): Simplify<Record<KeyedValue<Item, ItemKey>, Item[ItemValue]>>;
42
44
  /**
43
45
  * Create a record from an array of items using a specific key
44
46
  *
@@ -47,7 +49,7 @@ export declare function groupBy<Item extends PlainObject, ItemKey extends keyof
47
49
  * @param callback Callback to get an item's grouping key
48
50
  * @returns Record of keyed items
49
51
  */
50
- export declare function groupBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item>;
52
+ declare function groupBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item>;
51
53
  /**
52
54
  * Create a record from an array of items using a specific key
53
55
  *
@@ -56,15 +58,15 @@ export declare function groupBy<Item, Callback extends (item: Item, index: numbe
56
58
  * @param key Key to use for grouping
57
59
  * @returns Record of keyed items
58
60
  */
59
- export declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey): Simplify<Record<KeyedValue<Item, ItemKey>, Item>>;
61
+ declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey): Simplify<Record<KeyedValue<Item, ItemKey>, Item>>;
60
62
  /**
61
63
  * Create a record from an array of items _(using indices as keys)_
62
64
  * @param array Array to group
63
65
  * @returns Record of indiced items
64
66
  */
65
- export declare function groupBy<Item>(array: Item[]): Record<number, Item>;
66
- export declare namespace groupBy {
67
- var arrays: typeof groupArraysBy;
67
+ declare function groupBy<Item>(array: Item[]): Record<number, Item>;
68
+ declare namespace groupBy {
69
+ var arrays: typeof groupArraysBy;
68
70
  }
69
71
  /**
70
72
  * Create a record from an array of items using a specific key and value, grouping values into arrays
@@ -112,4 +114,5 @@ declare function groupArraysBy<Item, Callback extends (item: Item, index: number
112
114
  * @returns Record of keyed items
113
115
  */
114
116
  declare function groupArraysBy<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey): Simplify<Record<KeyedValue<Item, ItemKey>, Item[]>>;
115
- export {};
117
+ //#endregion
118
+ export { groupBy };
@@ -1,4 +1,4 @@
1
- import { groupValues } from "../internal/array/group.js";
1
+ import { groupValues } from "../internal/array/group.mjs";
2
2
  //#region src/array/group-by.ts
3
3
  function groupBy(array, first, second) {
4
4
  return groupValues(array, first, second, false);
@@ -0,0 +1,27 @@
1
+ import { difference } from "./difference.mjs";
2
+ import { exists } from "./exists.mjs";
3
+ import { filter } from "./filter.mjs";
4
+ import { find } from "./find.mjs";
5
+ import { flatten } from "./flatten.mjs";
6
+ import { range, times } from "./from.mjs";
7
+ import { getArray } from "./get.mjs";
8
+ import { chunk } from "../internal/array/chunk.mjs";
9
+ import { compact } from "../internal/array/compact.mjs";
10
+ import { indexOf } from "../internal/array/index-of.mjs";
11
+ import { shuffle } from "../internal/array/shuffle.mjs";
12
+ import { insert } from "./insert.mjs";
13
+ import { intersection } from "./intersection.mjs";
14
+ import { move } from "./move.mjs";
15
+ import { partition } from "./partition.mjs";
16
+ import { ArrayPosition, endsWithArray, getArrayPosition, includesArray, indexOfArray, startsWithArray } from "./position.mjs";
17
+ import { push } from "./push.mjs";
18
+ import { select } from "./select.mjs";
19
+ import { drop, slice, take } from "./slice.mjs";
20
+ import { sort } from "./sort.mjs";
21
+ import { splice } from "./splice.mjs";
22
+ import { swap } from "./swap.mjs";
23
+ import { toSet } from "./to-set.mjs";
24
+ import { toggle } from "./toggle.mjs";
25
+ import { union } from "./union.mjs";
26
+ import { update } from "./update.mjs";
27
+ export { ArrayPosition, chunk, compact, difference, drop, endsWithArray, exists, filter, find, flatten, getArray, getArrayPosition, includesArray, indexOf, indexOfArray, insert, intersection, move, partition, push, range, select, shuffle, slice, sort, splice, startsWithArray, swap, take, times, toSet, toggle, union, update };
@@ -0,0 +1,27 @@
1
+ import { chunk } from "../internal/array/chunk.mjs";
2
+ import { compact } from "../internal/array/compact.mjs";
3
+ import { indexOf } from "../internal/array/index-of.mjs";
4
+ import { shuffle } from "../internal/array/shuffle.mjs";
5
+ import { difference } from "./difference.mjs";
6
+ import { exists } from "./exists.mjs";
7
+ import { filter } from "./filter.mjs";
8
+ import { find } from "./find.mjs";
9
+ import { flatten } from "./flatten.mjs";
10
+ import { range, times } from "./from.mjs";
11
+ import { getArray } from "./get.mjs";
12
+ import { insert } from "./insert.mjs";
13
+ import { intersection } from "./intersection.mjs";
14
+ import { endsWithArray, getArrayPosition, includesArray, indexOfArray, startsWithArray } from "./position.mjs";
15
+ import { move } from "./move.mjs";
16
+ import { partition } from "./partition.mjs";
17
+ import { push } from "./push.mjs";
18
+ import { select } from "./select.mjs";
19
+ import { drop, slice, take } from "./slice.mjs";
20
+ import { sort } from "./sort.mjs";
21
+ import { splice } from "./splice.mjs";
22
+ import { swap } from "./swap.mjs";
23
+ import { toSet } from "./to-set.mjs";
24
+ import { toggle } from "./toggle.mjs";
25
+ import { union } from "./union.mjs";
26
+ import { update } from "./update.mjs";
27
+ export { chunk, compact, difference, drop, endsWithArray, exists, filter, find, flatten, getArray, getArrayPosition, includesArray, indexOf, indexOfArray, insert, intersection, move, partition, push, range, select, shuffle, slice, sort, splice, startsWithArray, swap, take, times, toSet, toggle, union, update };
@@ -1,3 +1,4 @@
1
+ //#region src/array/insert.d.ts
1
2
  /**
2
3
  * Insert items into an array at a specified index
3
4
  * @param array Original array
@@ -5,11 +6,13 @@
5
6
  * @param items Inserted items
6
7
  * @returns Updated array
7
8
  */
8
- export declare function insert<Item>(array: Item[], index: number, items: Item[]): Item[];
9
+ declare function insert<Item>(array: Item[], index: number, items: Item[]): Item[];
9
10
  /**
10
11
  * Insert items into an array _(at the end)_
11
12
  * @param array Original array
12
13
  * @param items Inserted items
13
14
  * @returns Updated array
14
15
  */
15
- export declare function insert<Item>(array: Item[], items: Item[]): Item[];
16
+ declare function insert<Item>(array: Item[], items: Item[]): Item[];
17
+ //#endregion
18
+ export { insert };
@@ -1,4 +1,4 @@
1
- import { INSERT_TYPE_INSERT, insertValues } from "../internal/array/insert.js";
1
+ import { INSERT_TYPE_INSERT, insertValues } from "../internal/array/insert.mjs";
2
2
  //#region src/array/insert.ts
3
3
  function insert(array, indexOrItems, items) {
4
4
  return insertValues(INSERT_TYPE_INSERT, array, items == null ? indexOrItems : items, typeof indexOrItems === "number" ? indexOrItems : array?.length, 0);
@@ -1,3 +1,4 @@
1
+ //#region src/array/intersection.d.ts
1
2
  /**
2
3
  * Get the common values between two arrays
3
4
  * @param first First array
@@ -5,7 +6,7 @@
5
6
  * @param callback Callback to get an item's value for comparison
6
7
  * @returns Common values from both arrays
7
8
  */
8
- export declare function intersection<First, Second>(first: First[], second: Second[], callback: (item: First | Second) => unknown): First[];
9
+ declare function intersection<First, Second>(first: First[], second: Second[], callback: (item: First | Second) => unknown): First[];
9
10
  /**
10
11
  * Get the common values between two arrays
11
12
  * @param first First array
@@ -13,11 +14,13 @@ export declare function intersection<First, Second>(first: First[], second: Seco
13
14
  * @param key Key to get an item's value for comparison
14
15
  * @returns Common values from both arrays
15
16
  */
16
- export declare function intersection<First extends Record<string, unknown>, Second extends Record<string, unknown>, Key extends keyof First & keyof Second>(first: First[], second: Second[], key: Key): First[];
17
+ declare function intersection<First extends Record<string, unknown>, Second extends Record<string, unknown>, Key extends keyof First & keyof Second>(first: First[], second: Second[], key: Key): First[];
17
18
  /**
18
19
  * Get the common values between two arrays
19
20
  * @param first First array
20
21
  * @param second Second array
21
22
  * @returns Common values from both arrays
22
23
  */
23
- export declare function intersection<First, Second>(first: First[], second: Second[]): First[];
24
+ declare function intersection<First, Second>(first: First[], second: Second[]): First[];
25
+ //#endregion
26
+ export { intersection };
@@ -1,4 +1,4 @@
1
- import { COMPARE_SETS_INTERSECTION, compareSets } from "../internal/array/sets.js";
1
+ import { COMPARE_SETS_INTERSECTION, compareSets } from "../internal/array/sets.mjs";
2
2
  //#region src/array/intersection.ts
3
3
  function intersection(first, second, key) {
4
4
  return compareSets(COMPARE_SETS_INTERSECTION, first, second, key);
@@ -1,4 +1,6 @@
1
- import type { PlainObject } from '../models';
1
+ import { PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/move.d.ts
2
4
  /**
3
5
  * Move an item _(or array of items)_ to the position of another item _(or array of items)_ within an array
4
6
  *
@@ -11,7 +13,7 @@ import type { PlainObject } from '../models';
11
13
  * @param key Key to get an item's value for matching
12
14
  * @returns Original array with items moved _(or unchanged if unable to move)_
13
15
  */
14
- export declare function move<Item extends PlainObject, Key extends keyof Item>(array: Item[], from: Item | Item[], to: Item | Item[], key: Key): Item[];
16
+ declare function move<Item extends PlainObject, Key extends keyof Item>(array: Item[], from: Item | Item[], to: Item | Item[], key: Key): Item[];
15
17
  /**
16
18
  * Move an item _(or array of items)_ to the position of another item _(or array of items)_ within an array
17
19
  *
@@ -24,7 +26,7 @@ export declare function move<Item extends PlainObject, Key extends keyof Item>(a
24
26
  * @param callback Callback to get an item's value for matching
25
27
  * @returns Original array with items moved _(or unchanged if unable to move)_
26
28
  */
27
- export declare function move<Item>(array: Item[], from: Item | Item[], to: Item | Item[], callback: (item: Item, index: number, array: Item[]) => unknown): Item[];
29
+ declare function move<Item>(array: Item[], from: Item | Item[], to: Item | Item[], callback: (item: Item, index: number, array: Item[]) => unknown): Item[];
28
30
  /**
29
31
  * Move an item _(or array of items)_ to the position of another item _(or array of items)_ within an array
30
32
  *
@@ -36,10 +38,10 @@ export declare function move<Item>(array: Item[], from: Item | Item[], to: Item
36
38
  * @param to Item or items to move to
37
39
  * @returns Original array with items moved _(or unchanged if unable to move)_
38
40
  */
39
- export declare function move<Item>(array: Item[], from: Item | Item[], to: Item | Item[]): Item[];
40
- export declare namespace move {
41
- var indices: typeof moveIndices;
42
- var toIndex: typeof moveToIndex;
41
+ declare function move<Item>(array: Item[], from: Item | Item[], to: Item | Item[]): Item[];
42
+ declare namespace move {
43
+ var indices: typeof moveIndices;
44
+ var toIndex: typeof moveToIndex;
43
45
  }
44
46
  /**
45
47
  * Move an item from one index to another within an array
@@ -83,4 +85,5 @@ declare function moveToIndex<Item>(array: Item[], value: Item | Item[], index: n
83
85
  * @returns Original array with items moved _(or unchanged if unable to move)_
84
86
  */
85
87
  declare function moveToIndex<Item>(array: Item[], value: Item | Item[], index: number): Item[];
86
- export {};
88
+ //#endregion
89
+ export { move };
@@ -1,5 +1,5 @@
1
- import { arraysOverlap } from "../internal/array/overlap.js";
2
- import { indexOfArray } from "./position.js";
1
+ import { arraysOverlap } from "../internal/array/overlap.mjs";
2
+ import { indexOfArray } from "./position.mjs";
3
3
  //#region src/array/move.ts
4
4
  function move(array, from, to, key) {
5
5
  if (!Array.isArray(array)) return [];
@@ -1,4 +1,6 @@
1
- import type { PlainObject } from '../models';
1
+ import { PlainObject } from "../models.mjs";
2
+
3
+ //#region src/array/partition.d.ts
2
4
  /**
3
5
  * Get a partitioned array of items
4
6
  * @param array Array to search in
@@ -6,7 +8,7 @@ import type { PlainObject } from '../models';
6
8
  * @param value Value to match against
7
9
  * @returns Partitioned array of items
8
10
  */
9
- export declare function partition<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item[][];
11
+ declare function partition<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item[][];
10
12
  /**
11
13
  * Get a partitioned array of items
12
14
  * @param array Array to search in
@@ -14,18 +16,20 @@ export declare function partition<Item, Callback extends (item: Item, index: num
14
16
  * @param value Value to match against
15
17
  * @returns Partitioned array of items
16
18
  */
17
- export declare function partition<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): Item[][];
19
+ declare function partition<Item extends PlainObject, Key extends keyof Item>(array: Item[], key: Key, value: Item[Key]): Item[][];
18
20
  /**
19
21
  * Get a partitioned array of items
20
22
  * @param array Array to search in
21
23
  * @param filter Filter callback to match items
22
24
  * @returns Partitioned array of items
23
25
  */
24
- export declare function partition<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item[][];
26
+ declare function partition<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item[][];
25
27
  /**
26
28
  * Get a partitioned array of items matching the given item
27
29
  * @param array Array to search in
28
30
  * @param item Item to match against
29
31
  * @returns Partitioned array of items
30
32
  */
31
- export declare function partition<Item>(array: Item[], item: Item): Item[][];
33
+ declare function partition<Item>(array: Item[], item: Item): Item[][];
34
+ //#endregion
35
+ export { partition };
@@ -1,4 +1,4 @@
1
- import { findValues } from "../internal/array/find.js";
1
+ import { findValues } from "../internal/array/find.mjs";
2
2
  //#region src/array/partition.ts
3
3
  function partition(array, ...parameters) {
4
4
  const { matched, notMatched } = findValues("all", array, parameters);