@vinicunca/perkakas 0.3.1 → 0.3.5

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 (338) hide show
  1. package/dist/commonjs/array/all-pass.js +2 -2
  2. package/dist/commonjs/array/any-pass.js +2 -2
  3. package/dist/commonjs/array/chunk.js +3 -3
  4. package/dist/commonjs/array/concat.js +2 -2
  5. package/dist/commonjs/array/count-by.js +8 -6
  6. package/dist/commonjs/array/difference-with.js +5 -15
  7. package/dist/commonjs/array/difference.js +5 -15
  8. package/dist/commonjs/array/drop-first-by.js +1 -1
  9. package/dist/commonjs/array/drop-last-while.js +2 -2
  10. package/dist/commonjs/array/drop-last.js +3 -3
  11. package/dist/commonjs/array/drop-while.js +2 -2
  12. package/dist/commonjs/array/drop.js +5 -12
  13. package/dist/commonjs/array/filter.js +3 -16
  14. package/dist/commonjs/array/find-index.js +12 -25
  15. package/dist/commonjs/array/find-last-index.js +3 -3
  16. package/dist/commonjs/array/find-last.js +3 -3
  17. package/dist/commonjs/array/find.js +10 -22
  18. package/dist/commonjs/array/first.js +4 -10
  19. package/dist/commonjs/array/flat-map-to-obj.js +10 -9
  20. package/dist/commonjs/array/flat-map.js +5 -15
  21. package/dist/commonjs/array/flatten-deep.js +9 -19
  22. package/dist/commonjs/array/flatten.js +5 -17
  23. package/dist/commonjs/array/for-each.js +18 -22
  24. package/dist/commonjs/array/group-by.js +5 -5
  25. package/dist/commonjs/array/index-by.js +20 -7
  26. package/dist/commonjs/array/index.js +4 -0
  27. package/dist/commonjs/array/intersection-with.js +5 -15
  28. package/dist/commonjs/array/intersection.js +6 -16
  29. package/dist/commonjs/array/last.js +2 -2
  30. package/dist/commonjs/array/length.js +2 -2
  31. package/dist/commonjs/array/map-to-obj.js +8 -7
  32. package/dist/commonjs/array/map.js +11 -15
  33. package/dist/commonjs/array/max-by.js +6 -6
  34. package/dist/commonjs/array/mean-by.js +6 -6
  35. package/dist/commonjs/array/merge-all.js +5 -1
  36. package/dist/commonjs/array/min-by.js +6 -6
  37. package/dist/commonjs/array/only.js +3 -6
  38. package/dist/commonjs/array/partition.js +5 -5
  39. package/dist/commonjs/array/range.js +2 -2
  40. package/dist/commonjs/array/rank-by.js +1 -1
  41. package/dist/commonjs/array/reduce.js +3 -3
  42. package/dist/commonjs/array/reject.js +9 -22
  43. package/dist/commonjs/array/reverse.js +2 -2
  44. package/dist/commonjs/array/sample.js +1 -1
  45. package/dist/commonjs/array/shuffle.js +3 -3
  46. package/dist/commonjs/array/sort-by.js +5 -43
  47. package/dist/commonjs/array/sort.js +3 -3
  48. package/dist/commonjs/array/sorted-index-by.js +19 -0
  49. package/dist/commonjs/array/sorted-index-with.js +15 -0
  50. package/dist/commonjs/array/sorted-index.js +12 -0
  51. package/dist/commonjs/array/sorted-last-index-by.js +19 -0
  52. package/dist/commonjs/array/sorted-last-index.js +12 -0
  53. package/dist/commonjs/array/splice.js +3 -3
  54. package/dist/commonjs/array/split-at.js +3 -3
  55. package/dist/commonjs/array/split-when.js +6 -6
  56. package/dist/commonjs/array/sum-by.js +6 -6
  57. package/dist/commonjs/array/swap-indices.js +7 -7
  58. package/dist/commonjs/array/take-first-by.js +1 -1
  59. package/dist/commonjs/array/take-while.js +2 -2
  60. package/dist/commonjs/array/take.js +8 -21
  61. package/dist/commonjs/array/uniq-by.js +4 -11
  62. package/dist/commonjs/array/uniq-with.js +8 -18
  63. package/dist/commonjs/array/uniq.js +4 -11
  64. package/dist/commonjs/array/zip-obj.js +2 -2
  65. package/dist/commonjs/array/zip-with.js +4 -4
  66. package/dist/commonjs/array/zip.js +2 -2
  67. package/dist/commonjs/function/create-pipe.js +1 -1
  68. package/dist/commonjs/function/index.js +1 -0
  69. package/dist/commonjs/function/pipe.js +18 -24
  70. package/dist/commonjs/function/purry.js +8 -9
  71. package/dist/commonjs/function/times.js +18 -0
  72. package/dist/commonjs/guard/is-defined.js +1 -1
  73. package/dist/commonjs/guard/is-empty.js +4 -4
  74. package/dist/commonjs/guard/is-nil.js +1 -1
  75. package/dist/commonjs/guard/is-not.js +1 -3
  76. package/dist/commonjs/number/add.js +2 -2
  77. package/dist/commonjs/number/clamp.js +6 -6
  78. package/dist/commonjs/number/divide.js +2 -2
  79. package/dist/commonjs/number/multiply.js +2 -2
  80. package/dist/commonjs/number/subtract.js +2 -2
  81. package/dist/commonjs/object/add-prop.js +2 -2
  82. package/dist/commonjs/object/clone.js +5 -5
  83. package/dist/commonjs/object/equals.js +48 -52
  84. package/dist/commonjs/object/for-each-obj.js +9 -9
  85. package/dist/commonjs/object/from-pairs.js +6 -2
  86. package/dist/commonjs/object/invert.js +5 -3
  87. package/dist/commonjs/object/keys.js +3 -2
  88. package/dist/commonjs/object/map-keys.js +2 -2
  89. package/dist/commonjs/object/map-values.js +2 -2
  90. package/dist/commonjs/object/merge-deep.js +2 -2
  91. package/dist/commonjs/object/merge.js +2 -2
  92. package/dist/commonjs/object/omit-by.js +7 -6
  93. package/dist/commonjs/object/omit.js +2 -2
  94. package/dist/commonjs/object/path-or.js +6 -6
  95. package/dist/commonjs/object/pick-by.js +9 -8
  96. package/dist/commonjs/object/pick.js +7 -9
  97. package/dist/commonjs/object/set-path.js +14 -15
  98. package/dist/commonjs/object/set.js +2 -2
  99. package/dist/commonjs/object/swap-props.js +2 -2
  100. package/dist/commonjs/string/random-string.js +11 -5
  101. package/dist/commonjs/string/string-to-path.js +5 -5
  102. package/dist/commonjs/utils/binary-search-cutoff-index.js +19 -0
  103. package/dist/commonjs/utils/heap.js +1 -1
  104. package/dist/commonjs/utils/purry-order-rules.js +1 -1
  105. package/dist/commonjs/utils/quick-select.js +2 -2
  106. package/dist/commonjs/utils/reduce-lazy.js +9 -6
  107. package/dist/commonjs/utils/to-single.js +1 -2
  108. package/dist/es/array/all-pass.js +2 -2
  109. package/dist/es/array/any-pass.js +2 -2
  110. package/dist/es/array/chunk.js +3 -3
  111. package/dist/es/array/concat.js +2 -2
  112. package/dist/es/array/count-by.js +8 -6
  113. package/dist/es/array/difference-with.js +5 -15
  114. package/dist/es/array/difference.js +5 -15
  115. package/dist/es/array/drop-first-by.js +1 -1
  116. package/dist/es/array/drop-last-while.js +2 -2
  117. package/dist/es/array/drop-last.js +3 -3
  118. package/dist/es/array/drop-while.js +2 -2
  119. package/dist/es/array/drop.js +5 -12
  120. package/dist/es/array/filter.js +3 -16
  121. package/dist/es/array/find-index.js +12 -25
  122. package/dist/es/array/find-last-index.js +3 -3
  123. package/dist/es/array/find-last.js +3 -3
  124. package/dist/es/array/find.js +10 -22
  125. package/dist/es/array/first.js +4 -10
  126. package/dist/es/array/flat-map-to-obj.js +10 -9
  127. package/dist/es/array/flat-map.js +5 -15
  128. package/dist/es/array/flatten-deep.js +9 -19
  129. package/dist/es/array/flatten.js +5 -17
  130. package/dist/es/array/for-each.js +18 -22
  131. package/dist/es/array/group-by.js +5 -5
  132. package/dist/es/array/index-by.js +20 -7
  133. package/dist/es/array/index.js +4 -0
  134. package/dist/es/array/intersection-with.js +5 -15
  135. package/dist/es/array/intersection.js +6 -16
  136. package/dist/es/array/last.js +2 -2
  137. package/dist/es/array/length.js +2 -2
  138. package/dist/es/array/map-to-obj.js +8 -7
  139. package/dist/es/array/map.js +11 -15
  140. package/dist/es/array/max-by.js +6 -6
  141. package/dist/es/array/mean-by.js +6 -6
  142. package/dist/es/array/merge-all.js +5 -1
  143. package/dist/es/array/min-by.js +6 -6
  144. package/dist/es/array/only.js +3 -6
  145. package/dist/es/array/partition.js +5 -5
  146. package/dist/es/array/range.js +2 -2
  147. package/dist/es/array/rank-by.js +1 -1
  148. package/dist/es/array/reduce.js +3 -3
  149. package/dist/es/array/reject.js +9 -22
  150. package/dist/es/array/reverse.js +2 -2
  151. package/dist/es/array/sample.js +1 -1
  152. package/dist/es/array/shuffle.js +3 -3
  153. package/dist/es/array/sort-by.js +5 -43
  154. package/dist/es/array/sort.js +3 -3
  155. package/dist/es/array/sorted-index-by.js +15 -0
  156. package/dist/es/array/sorted-index-with.js +11 -0
  157. package/dist/es/array/sorted-index.js +8 -0
  158. package/dist/es/array/sorted-last-index-by.js +15 -0
  159. package/dist/es/array/sorted-last-index.js +8 -0
  160. package/dist/es/array/splice.js +3 -3
  161. package/dist/es/array/split-at.js +3 -3
  162. package/dist/es/array/split-when.js +6 -6
  163. package/dist/es/array/sum-by.js +6 -6
  164. package/dist/es/array/swap-indices.js +7 -7
  165. package/dist/es/array/take-first-by.js +1 -1
  166. package/dist/es/array/take-while.js +2 -2
  167. package/dist/es/array/take.js +8 -21
  168. package/dist/es/array/uniq-by.js +4 -11
  169. package/dist/es/array/uniq-with.js +8 -18
  170. package/dist/es/array/uniq.js +4 -11
  171. package/dist/es/array/zip-obj.js +2 -2
  172. package/dist/es/array/zip-with.js +4 -4
  173. package/dist/es/array/zip.js +2 -2
  174. package/dist/es/function/index.js +1 -0
  175. package/dist/es/function/pipe.js +18 -24
  176. package/dist/es/function/purry.js +8 -9
  177. package/dist/es/function/times.js +14 -0
  178. package/dist/es/guard/is-defined.js +1 -1
  179. package/dist/es/guard/is-empty.js +4 -4
  180. package/dist/es/guard/is-nil.js +1 -1
  181. package/dist/es/guard/is-not.js +1 -3
  182. package/dist/es/number/add.js +2 -2
  183. package/dist/es/number/clamp.js +6 -6
  184. package/dist/es/number/divide.js +2 -2
  185. package/dist/es/number/multiply.js +2 -2
  186. package/dist/es/number/subtract.js +2 -2
  187. package/dist/es/object/add-prop.js +2 -2
  188. package/dist/es/object/clone.js +5 -5
  189. package/dist/es/object/equals.js +48 -52
  190. package/dist/es/object/for-each-obj.js +9 -9
  191. package/dist/es/object/from-pairs.js +5 -1
  192. package/dist/es/object/invert.js +5 -3
  193. package/dist/es/object/keys.js +3 -2
  194. package/dist/es/object/map-keys.js +2 -2
  195. package/dist/es/object/map-values.js +2 -2
  196. package/dist/es/object/merge-deep.js +2 -2
  197. package/dist/es/object/merge.js +2 -2
  198. package/dist/es/object/omit-by.js +7 -6
  199. package/dist/es/object/omit.js +2 -2
  200. package/dist/es/object/path-or.js +6 -6
  201. package/dist/es/object/pick-by.js +9 -8
  202. package/dist/es/object/pick.js +7 -9
  203. package/dist/es/object/set-path.js +12 -13
  204. package/dist/es/object/set.js +2 -2
  205. package/dist/es/object/swap-props.js +2 -2
  206. package/dist/es/string/random-string.js +11 -5
  207. package/dist/es/string/string-to-path.js +5 -5
  208. package/dist/es/utils/binary-search-cutoff-index.js +15 -0
  209. package/dist/es/utils/heap.js +1 -1
  210. package/dist/es/utils/purry-order-rules.js +1 -1
  211. package/dist/es/utils/quick-select.js +2 -2
  212. package/dist/es/utils/reduce-lazy.js +9 -6
  213. package/dist/es/utils/to-single.js +1 -2
  214. package/dist/metadata.json +7915 -4373
  215. package/dist/types/array/count-by.d.ts.map +1 -1
  216. package/dist/types/array/difference-with.d.ts +2 -2
  217. package/dist/types/array/difference-with.d.ts.map +1 -1
  218. package/dist/types/array/difference.d.ts +2 -2
  219. package/dist/types/array/difference.d.ts.map +1 -1
  220. package/dist/types/array/drop.d.ts +2 -2
  221. package/dist/types/array/drop.d.ts.map +1 -1
  222. package/dist/types/array/filter.d.ts +5 -5
  223. package/dist/types/array/filter.d.ts.map +1 -1
  224. package/dist/types/array/find-index.d.ts +5 -20
  225. package/dist/types/array/find-index.d.ts.map +1 -1
  226. package/dist/types/array/find.d.ts +5 -12
  227. package/dist/types/array/find.d.ts.map +1 -1
  228. package/dist/types/array/first.d.ts +2 -5
  229. package/dist/types/array/first.d.ts.map +1 -1
  230. package/dist/types/array/flat-map-to-obj.d.ts +4 -4
  231. package/dist/types/array/flat-map-to-obj.d.ts.map +1 -1
  232. package/dist/types/array/flat-map.d.ts +2 -11
  233. package/dist/types/array/flat-map.d.ts.map +1 -1
  234. package/dist/types/array/flatten-deep.d.ts +15 -5
  235. package/dist/types/array/flatten-deep.d.ts.map +1 -1
  236. package/dist/types/array/flatten.d.ts +17 -2
  237. package/dist/types/array/flatten.d.ts.map +1 -1
  238. package/dist/types/array/for-each.d.ts +3 -3
  239. package/dist/types/array/for-each.d.ts.map +1 -1
  240. package/dist/types/array/group-by.d.ts.map +1 -1
  241. package/dist/types/array/index-by.d.ts +25 -6
  242. package/dist/types/array/index-by.d.ts.map +1 -1
  243. package/dist/types/array/index.d.ts +4 -0
  244. package/dist/types/array/index.d.ts.map +1 -1
  245. package/dist/types/array/intersection-with.d.ts +2 -2
  246. package/dist/types/array/intersection-with.d.ts.map +1 -1
  247. package/dist/types/array/intersection.d.ts +2 -2
  248. package/dist/types/array/intersection.d.ts.map +1 -1
  249. package/dist/types/array/last.d.ts +13 -4
  250. package/dist/types/array/last.d.ts.map +1 -1
  251. package/dist/types/array/map.d.ts +3 -3
  252. package/dist/types/array/map.d.ts.map +1 -1
  253. package/dist/types/array/max-by.d.ts.map +1 -1
  254. package/dist/types/array/mean-by.d.ts.map +1 -1
  255. package/dist/types/array/merge-all.d.ts +1 -1
  256. package/dist/types/array/merge-all.d.ts.map +1 -1
  257. package/dist/types/array/min-by.d.ts.map +1 -1
  258. package/dist/types/array/reduce.d.ts +2 -2
  259. package/dist/types/array/reduce.d.ts.map +1 -1
  260. package/dist/types/array/reject.d.ts +3 -3
  261. package/dist/types/array/reject.d.ts.map +1 -1
  262. package/dist/types/array/sort-by.d.ts +33 -33
  263. package/dist/types/array/sort-by.d.ts.map +1 -1
  264. package/dist/types/array/sort.d.ts.map +1 -1
  265. package/dist/types/array/sorted-index-by.d.ts +63 -0
  266. package/dist/types/array/sorted-index-by.d.ts.map +1 -0
  267. package/dist/types/array/sorted-index-with.d.ts +65 -0
  268. package/dist/types/array/sorted-index-with.d.ts.map +1 -0
  269. package/dist/types/array/sorted-index.d.ts +47 -0
  270. package/dist/types/array/sorted-index.d.ts.map +1 -0
  271. package/dist/types/array/sorted-last-index-by.d.ts +63 -0
  272. package/dist/types/array/sorted-last-index-by.d.ts.map +1 -0
  273. package/dist/types/array/sorted-last-index.d.ts +47 -0
  274. package/dist/types/array/sorted-last-index.d.ts.map +1 -0
  275. package/dist/types/array/sum-by.d.ts.map +1 -1
  276. package/dist/types/array/take.d.ts +2 -2
  277. package/dist/types/array/take.d.ts.map +1 -1
  278. package/dist/types/array/uniq-with.d.ts +3 -3
  279. package/dist/types/array/uniq-with.d.ts.map +1 -1
  280. package/dist/types/array/uniq.d.ts +15 -4
  281. package/dist/types/array/uniq.d.ts.map +1 -1
  282. package/dist/types/array/zip-obj.d.ts +2 -2
  283. package/dist/types/array/zip-obj.d.ts.map +1 -1
  284. package/dist/types/array/zip.d.ts.map +1 -1
  285. package/dist/types/function/conditional.d.ts.map +1 -1
  286. package/dist/types/function/index.d.ts +1 -0
  287. package/dist/types/function/index.d.ts.map +1 -1
  288. package/dist/types/function/noop.d.ts.map +1 -1
  289. package/dist/types/function/pipe.d.ts +21 -0
  290. package/dist/types/function/pipe.d.ts.map +1 -1
  291. package/dist/types/function/purry.d.ts +21 -6
  292. package/dist/types/function/purry.d.ts.map +1 -1
  293. package/dist/types/function/times.d.ts +29 -0
  294. package/dist/types/function/times.d.ts.map +1 -0
  295. package/dist/types/guard/is-empty.d.ts +15 -4
  296. package/dist/types/guard/is-empty.d.ts.map +1 -1
  297. package/dist/types/guard/is-not.d.ts +1 -1
  298. package/dist/types/guard/is-not.d.ts.map +1 -1
  299. package/dist/types/guard/is-object.d.ts +1 -1
  300. package/dist/types/guard/is-object.d.ts.map +1 -1
  301. package/dist/types/number/clamp.d.ts +7 -8
  302. package/dist/types/number/clamp.d.ts.map +1 -1
  303. package/dist/types/object/add-prop.d.ts +2 -2
  304. package/dist/types/object/add-prop.d.ts.map +1 -1
  305. package/dist/types/object/equals.d.ts +2 -2
  306. package/dist/types/object/equals.d.ts.map +1 -1
  307. package/dist/types/object/for-each-obj.d.ts +6 -6
  308. package/dist/types/object/for-each-obj.d.ts.map +1 -1
  309. package/dist/types/object/from-pairs.d.ts +9 -0
  310. package/dist/types/object/from-pairs.d.ts.map +1 -1
  311. package/dist/types/object/keys.d.ts +8 -4
  312. package/dist/types/object/keys.d.ts.map +1 -1
  313. package/dist/types/object/pick.d.ts +9 -9
  314. package/dist/types/object/pick.d.ts.map +1 -1
  315. package/dist/types/object/prop.d.ts.map +1 -1
  316. package/dist/types/object/set-path.d.ts +1 -1
  317. package/dist/types/object/set-path.d.ts.map +1 -1
  318. package/dist/types/object/to-pairs.d.ts +1 -1
  319. package/dist/types/object/to-pairs.d.ts.map +1 -1
  320. package/dist/types/string/random-string.d.ts +6 -2
  321. package/dist/types/string/random-string.d.ts.map +1 -1
  322. package/dist/types/string/string-to-path.d.ts.map +1 -1
  323. package/dist/types/type/type.d.ts.map +1 -1
  324. package/dist/types/utils/binary-search-cutoff-index.d.ts +2 -0
  325. package/dist/types/utils/binary-search-cutoff-index.d.ts.map +1 -0
  326. package/dist/types/utils/narrow.d.ts +1 -1
  327. package/dist/types/utils/narrow.d.ts.map +1 -1
  328. package/dist/types/utils/purry-on.d.ts +1 -1
  329. package/dist/types/utils/purry-on.d.ts.map +1 -1
  330. package/dist/types/utils/reduce-lazy.d.ts +2 -21
  331. package/dist/types/utils/reduce-lazy.d.ts.map +1 -1
  332. package/dist/types/utils/swap-in-place.d.ts.map +1 -1
  333. package/dist/types/utils/to-single.d.ts +4 -2
  334. package/dist/types/utils/to-single.d.ts.map +1 -1
  335. package/dist/types/utils/types.d.ts +2 -2
  336. package/dist/types/utils/types.d.ts.map +1 -1
  337. package/dist/types/utils/with-precision.d.ts.map +1 -1
  338. package/package.json +2 -4
@@ -1,4 +1,4 @@
1
- import type { LazyResult } from '../utils/reduce-lazy';
1
+ import type { LazyEvaluator } from '../function/pipe';
2
2
  import type { IterableContainer, Pred, PredIndexed, PredIndexedOptional } from '../utils/types';
3
3
  /**
4
4
  * Map each element of an array using a defined callback function. If the input
@@ -52,8 +52,8 @@ type StrictOut<T extends IterableContainer, K> = {
52
52
  export declare namespace map {
53
53
  function indexed<T, K>(array: ReadonlyArray<T>, fn: PredIndexed<T, K>): Array<K>;
54
54
  function indexed<T, K>(fn: PredIndexed<T, K>): (array: ReadonlyArray<T>) => Array<K>;
55
- const lazy: <T, K>(fn: PredIndexedOptional<T, K>) => (value: T, index?: number | undefined, array?: readonly T[] | undefined) => LazyResult<K>;
56
- const lazyIndexed: (<T, K>(fn: PredIndexedOptional<T, K>) => (value: T, index?: number | undefined, array?: readonly T[] | undefined) => LazyResult<K>) & {
55
+ const lazy: <T, K>(fn: PredIndexedOptional<T, K>) => LazyEvaluator<T, K>;
56
+ const lazyIndexed: (<T, K>(fn: PredIndexedOptional<T, K>) => LazyEvaluator<T, K>) & {
57
57
  readonly indexed: true;
58
58
  };
59
59
  const strict: Strict;
@@ -1 +1 @@
1
- {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/array/map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,iBAAiB,EACjB,IAAI,EACJ,WAAW,EACX,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAMxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAE7E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EACtB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACb,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAkCzC,UAAU,MAAM;IACd,CAAC,CAAC,SAAS,iBAAiB,EAAE,CAAC,EAC7B,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GACzB,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEnB,CAA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G,SAAS,CAAC;IACjB,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAI/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"mean-by.d.ts","sourceRoot":"","sources":["../../../src/array/mean-by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAC;AAmBvE;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,MAAM,CAAC,CAAC,EACtB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACtB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;AAEvC;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,MAAM,CAAC,CAAC,EACtB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACtB,MAAM,CAAC;AAMV,yBAAiB,MAAM,CAAC;IACtB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,MAAM,CAAC;IAEV,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAKxC"}
1
+ {"version":3,"file":"mean-by.d.ts","sourceRoot":"","sources":["../../../src/array/mean-by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAC;AAoBvE;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,MAAM,CAAC,CAAC,EACtB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACtB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;AAEvC;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,MAAM,CAAC,CAAC,EACtB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACtB,MAAM,CAAC;AAMV,yBAAiB,MAAM,CAAC;IACtB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,MAAM,CAAC;IAEV,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAKxC"}
@@ -11,6 +11,6 @@ export declare function mergeAll<A>(array: readonly [A]): A;
11
11
  export declare function mergeAll<A, B>(array: readonly [A, B]): A & B;
12
12
  export declare function mergeAll<A, B, C>(array: readonly [A, B, C]): A & B & C;
13
13
  export declare function mergeAll<A, B, C, D>(array: readonly [A, B, C, D]): A & B & C & D;
14
- export declare function mergeAll<A, B, C, D, E>(array: [A, B, C, D, E]): A & B & C & D & E;
14
+ export declare function mergeAll<A, B, C, D, E>(array: readonly [A, B, C, D, E]): A & B & C & D & E;
15
15
  export declare function mergeAll(array: ReadonlyArray<object>): object;
16
16
  //# sourceMappingURL=merge-all.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-all.d.ts","sourceRoot":"","sources":["../../../src/array/merge-all.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACpD,wB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AAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,GAAG,SAAS,CAAC;IACjB,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAI/C"}
1
+ {"version":3,"file":"min-by.d.ts","sourceRoot":"","sources":["../../../src/array/min-by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAC;AAqBvE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACtB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GACtB,CAAC,GAAG,SAAS,CAAC;AAMjB,yBAAiB,KAAK,CAAC;IACrB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,GAAG,SAAS,CAAC;IACjB,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAI/C"}
@@ -29,7 +29,7 @@ export declare function reduce<T, K>(items: ReadonlyArray<T>, fn: (acc: K, item:
29
29
  */
30
30
  export declare function reduce<T, K>(fn: (acc: K, item: T) => K, initialValue: K): (items: ReadonlyArray<T>) => K;
31
31
  export declare namespace reduce {
32
- function indexed<T, K>(array: ReadonlyArray<T>, fn: (acc: K, item: T, index: number, items: Array<T>) => K, initialValue: K): K;
33
- function indexed<T, K>(fn: (acc: K, item: T, index: number, items: Array<T>) => K, initialValue: K): (array: ReadonlyArray<T>) => K;
32
+ function indexed<T, K>(array: ReadonlyArray<T>, fn: (acc: K, item: T, index: number, items: ReadonlyArray<T>) => K, initialValue: K): K;
33
+ function indexed<T, K>(fn: (acc: K, item: T, index: number, items: ReadonlyArray<T>) => K, initialValue: K): (array: ReadonlyArray<T>) => K;
34
34
  }
35
35
  //# sourceMappingURL=reduce.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reduce.d.ts","sourceRoot":"","sources":["../../../src/array/reduce.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EACzB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAC1B,YAAY,EAAE,CAAC,GACd,CAAC,CAAC;AAEL;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EACzB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAC1B,YAAY,EAAE,CAAC,GACd,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAmBlC,yBAAiB,MAAM,CAAC;IACtB,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,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1B,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,EAClE,YAAY,EAAE,CAAC,GACd,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;CAInC"}
@@ -1,4 +1,4 @@
1
- import type { LazyResult } from '../utils/reduce-lazy';
1
+ import type { LazyEvaluator } from '../function/pipe';
2
2
  import type { Pred, PredIndexed, PredIndexedOptional } from '../utils/types';
3
3
  /**
4
4
  * Reject the elements of an array that meet the condition specified in a callback function.
@@ -34,8 +34,8 @@ export declare function reject<T>(fn: Pred<T, boolean>): (items: ReadonlyArray<T
34
34
  export declare namespace reject {
35
35
  function indexed<T, K>(array: ReadonlyArray<T>, fn: PredIndexed<T, boolean>): Array<K>;
36
36
  function indexed<T, K>(fn: PredIndexed<T, boolean>): (array: ReadonlyArray<T>) => Array<K>;
37
- const lazy: <T>(fn: PredIndexedOptional<T, boolean>) => (value: T, index?: number | undefined, array?: readonly T[] | undefined) => LazyResult<T>;
38
- const lazyIndexed: (<T>(fn: PredIndexedOptional<T, boolean>) => (value: T, index?: number | undefined, array?: readonly T[] | undefined) => LazyResult<T>) & {
37
+ const lazy: <T>(fn: PredIndexedOptional<T, boolean>) => LazyEvaluator<T>;
38
+ const lazyIndexed: (<T>(fn: PredIndexedOptional<T, boolean>) => LazyEvaluator<T>) & {
39
39
  readonly indexed: true;
40
40
  };
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"reject.d.ts","sourceRoot":"","sources":["../../../src/array/reject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAM7E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,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;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GACnB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAwBzC,yBAAiB,MAAM,CAAC;IACtB,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,GAC1B,KAAK,CAAC,CAAC,CAAC,CAAC;IACZ,SAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,GAC1B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;IAKlC,MAAM,IAAI,8DAAe,CAAC;IAC1B,MAAM,WAAW;;KAA6B,CAAC;CACvD"}
@@ -1,29 +1,24 @@
1
1
  import type { IterableContainer, NonEmptyArray } from '../utils/types';
2
- declare const ALL_DIRECTIONS: readonly ["asc", "desc"];
3
- type Direction = (typeof ALL_DIRECTIONS)[number];
4
- type ComparablePrimitive = boolean | number | string;
5
- type Comparable = {
6
- valueOf(): ComparablePrimitive;
7
- } | ComparablePrimitive;
8
- type SortProjection<T> = (x: T) => Comparable;
9
- type SortPair<T> = readonly [
10
- projector: SortProjection<T>,
11
- direction: Direction
12
- ];
13
- type SortRule<T> = SortPair<T> | SortProjection<T>;
2
+ import { type OrderRule } from '../utils/purry-order-rules';
14
3
  /**
15
- * Sorts the list according to the supplied functions and directions.
16
- * Sorting is based on a native `sort` function. It's not guaranteed to be stable.
4
+ * Sorts `data` using the provided ordering rules. The `sort` is done via the native `Array.prototype.sort` but is performed on a shallow copy of the array to avoid mutating the original data.
17
5
  *
18
- * Directions are applied to functions in order and default to ascending if not specified.
6
+ * To maintain the shape of more complex inputs (like non-empty arrays, tuples, etc...) use the `strict` variant.
19
7
  *
20
- * If the input array is more complex (non-empty array, tuple, etc...) use the
21
- * strict mode to maintain it's shape.
8
+ * There are several other functions that take order rules and **bypass** the need to sort the array first (in *O(nlogn)* time):
9
+ * `firstBy` === `first(sortBy(data, ...rules))`, O(n).
10
+ * `takeFirstBy` === `take(sortBy(data, ...rules), k)`, O(nlogk).
11
+ * `dropFirstBy` === `drop(sortBy(data, ...rules), k)`, O(nlogk).
12
+ * `nthBy` === `sortBy(data, ...rules).at(k)`, O(n).
13
+ * `rankBy` === `sortedIndex(sortBy(data, ...rules), item)`, O(n).
14
+ * Refer to the docs for more details.
22
15
  *
23
- * @param sortRules main sort rule
16
+ * @param data - The input array.
17
+ * @param rules - A variadic array of order rules defining the sorting criteria. Each order rule is a projection function that extracts a comparable value from the data. Sorting is based on these extracted values using the native `<` and `>` operators. Earlier rules take precedence over later ones. Use the syntax `[projection, "desc"]` for descending order.
18
+ * @return - A shallow copy of the input array sorted by the provided rules.
24
19
  * @signature
25
- * P.sortBy(sortRule, ...additionalSortRules)(array)
26
- * P.sortBy.strict(sortRule, ...additionalSortRules)(array)
20
+ * P.sortBy(...rules)(data)
21
+ * P.sortBy.strict(...rules)(data)
27
22
  * @example
28
23
  * P.pipe(
29
24
  * [{ a: 1 }, { a: 3 }, { a: 7 }, { a: 2 }],
@@ -37,21 +32,26 @@ type SortRule<T> = SortPair<T> | SortProjection<T>;
37
32
  * @category Array
38
33
  * @strict
39
34
  */
40
- export declare function sortBy<T>(...sortRules: Readonly<NonEmptyArray<SortRule<T>>>): (array: ReadonlyArray<T>) => Array<T>;
35
+ export declare function sortBy<T>(...rules: Readonly<NonEmptyArray<OrderRule<T>>>): (data: ReadonlyArray<T>) => Array<T>;
41
36
  /**
42
- * Sorts the list according to the supplied functions and directions.
43
- * Sorting is based on a native `sort` function. It's not guaranteed to be stable.
37
+ * Sorts `data` using the provided ordering rules. The `sort` is done via the native `Array.prototype.sort` but is performed on a shallow copy of the array to avoid mutating the original data.
44
38
  *
45
- * Directions are applied to functions in order and default to ascending if not specified.
39
+ * To maintain the shape of more complex inputs (like non-empty arrays, tuples, etc...) use the `strict` variant.
46
40
  *
47
- * If the input array is more complex (non-empty array, tuple, etc...) use the
48
- * strict mode to maintain it's shape.
41
+ * There are several other functions that take order rules and **bypass** the need to sort the array first (in *O(nlogn)* time):
42
+ * `firstBy` === `first(sortBy(data, ...rules))`, O(n).
43
+ * `takeFirstBy` === `take(sortBy(data, ...rules), k)`, O(nlogk).
44
+ * `dropFirstBy` === `drop(sortBy(data, ...rules), k)`, O(nlogk).
45
+ * `nthBy` === `sortBy(data, ...rules).at(k)`, O(n).
46
+ * `rankBy` === `sortedIndex(sortBy(data, ...rules), item)`, O(n).
47
+ * Refer to the docs for more details.
49
48
  *
50
- * @param array the array to sort
51
- * @param sortRules main sort rule
49
+ * @param data - The input array.
50
+ * @param rules - A variadic array of order rules defining the sorting criteria. Each order rule is a projection function that extracts a comparable value from the data. Sorting is based on these extracted values using the native `<` and `>` operators. Earlier rules take precedence over later ones. Use the syntax `[projection, "desc"]` for descending order.
51
+ * @return - A shallow copy of the input array sorted by the provided rules.
52
52
  * @signature
53
- * P.sortBy(array, sortRule, ...additionalSortRules)
54
- * P.sortBy.strict(array, sortRule, ...additionalSortRules)
53
+ * P.sortBy(data, ...rules)
54
+ * P.sortBy.strict(data, ...rules)
55
55
  * @example
56
56
  * P.sortBy(
57
57
  * [{ a: 1 }, { a: 3 }, { a: 7 }, { a: 2 }],
@@ -84,10 +84,10 @@ export declare function sortBy<T>(...sortRules: Readonly<NonEmptyArray<SortRule<
84
84
  * @category Array
85
85
  * @strict
86
86
  */
87
- export declare function sortBy<T>(array: ReadonlyArray<T>, ...sortRules: Readonly<NonEmptyArray<SortRule<T>>>): Array<T>;
87
+ export declare function sortBy<T>(array: ReadonlyArray<T>, ...sortRules: Readonly<NonEmptyArray<OrderRule<T>>>): Array<T>;
88
88
  interface Strict {
89
- <T extends IterableContainer>(...sortRules: Readonly<NonEmptyArray<SortRule<T[number]>>>): (array: T) => SortedBy<T>;
90
- <T extends IterableContainer>(array: T, ...sortRules: Readonly<NonEmptyArray<SortRule<T[number]>>>): SortedBy<T>;
89
+ <T extends IterableContainer>(...sortRules: Readonly<NonEmptyArray<OrderRule<T[number]>>>): (array: T) => SortedBy<T>;
90
+ <T extends IterableContainer>(array: T, ...sortRules: Readonly<NonEmptyArray<OrderRule<T[number]>>>): SortedBy<T>;
91
91
  }
92
92
  type SortedBy<T extends IterableContainer> = {
93
93
  -readonly [P in keyof T]: T[number];
@@ -1 +1 @@
1
- {"version":3,"file":"sort-by.d.ts","sourceRoot":"","sources":["../../../src/array/sort-by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIvE,QAAA,MAAM,cAAc,0BAA2B,CAAC;AAChD,KAAK,SAAS,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,KAAK,mBAAmB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AACrD,KAAK,UAAU,GAAG;IAAE,OAAO,IAAI,mBAAmB,CAAA;CAAE,GAAG,mBAAmB,CAAC;AAC3E,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,UAAU,CAAC;AAC9C,KAAK,QAAQ,CAAC,CAAC,IAAI,SAAS;IAC1B,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAC5B,SAAS,EAAE,SAAS;CACrB,CAAC;AACF,KAAK,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;AAOnD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,GAAG,SAAS,EAAE,QAAQ,CAAC,aAAa,CAAC,QAAQ,C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A,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAC1B,KAAK,CAAC,CAAC,CAAC,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAC1B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAezC,UAAU,MAAM;IACd,CAAC,CAAC,SAAS,iBAAiB,EAC1B,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,GAC1C,MAAM,CAAC,CAAC,CAAC,CAAC;IAEb,CAAC,CAAC,SAAS,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,GAAG,CAC1E,KAAK,EAAE,CAAC,KACL,MAAM,CAAC,CAAC,CAAC,CAAC;CAChB;AAED,KAAK,MAAM,CAAC,CAAC,SAAS,iBAAiB,IAAI;IACzC,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;CACpC,CAAC;AAEF,yBAAiB,IAAI,CAAC;IACb,MAAM,MAAM,EAAE,MAAa,CAAC;CACpC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Find the insertion position (index) of an item in an array with items sorted
3
+ * in ascending order using a value function; so that `splice(sortedIndex, 0, item)`
4
+ * would result in maintaining the arrays sort-ness. The array can contain
5
+ * duplicates.
6
+ * If the item already exists in the array the index would be of the *first*
7
+ * occurrence of the item.
8
+ *
9
+ * Runs in O(logN) time.
10
+ *
11
+ * @param data - The (ascending) sorted array.
12
+ * @param item - The item to insert.
13
+ * @param valueFunction - All comparisons would be performed on the result of
14
+ * calling this function on each compared item. Preferably this function should
15
+ * return a `number` or `string`. This function should be the same as the one
16
+ * provided to sortBy to sort the array.
17
+ * @return - Insertion index (In the range 0..data.length)
18
+ *
19
+ * @signature
20
+ * P.sortedIndexBy(data, item, valueFunction)
21
+ * @example
22
+ * P.sortedIndexBy([{age:20},{age:22}],{age:21},prop('age')) // => 1
23
+ * @dataFirst
24
+ * @indexed
25
+ * @category Array
26
+ *
27
+ * @see sortedIndex, sortedIndexWith, sortedLastIndex, sortedLastIndexBy
28
+ */
29
+ export declare function sortedIndexBy<T>(data: ReadonlyArray<T>, item: T, valueFunction: (item: T) => NonNullable<unknown>): number;
30
+ /**
31
+ * Find the insertion position (index) of an item in an array with items sorted
32
+ * in ascending order using a value function; so that `splice(sortedIndex, 0, item)`
33
+ * would result in maintaining the arrays sort-ness. The array can contain
34
+ * duplicates.
35
+ * If the item already exists in the array the index would be of the *first*
36
+ * occurrence of the item.
37
+ *
38
+ * Runs in O(logN) time.
39
+ *
40
+ * @param data - The (ascending) sorted array.
41
+ * @param item - The item to insert.
42
+ * @param valueFunction - All comparisons would be performed on the result of
43
+ * calling this function on each compared item. Preferably this function should
44
+ * return a `number` or `string`. This function should be the same as the one
45
+ * provided to sortBy to sort the array.
46
+ * @return - Insertion index (In the range 0..data.length)
47
+ *
48
+ * @signature
49
+ * P.sortedIndexBy(data, item, valueFunction)
50
+ * @example
51
+ * P.sortedIndexBy([{age:20},{age:22}],{age:21},prop('age')) // => 1
52
+ * @dataLast
53
+ * @indexed
54
+ * @category Array
55
+ *
56
+ * @see sortedIndex, sortedIndexWith, sortedLastIndex, sortedLastIndexBy
57
+ */
58
+ export declare function sortedIndexBy<T>(item: T, valueFunction: (item: T) => NonNullable<unknown>): (data: ReadonlyArray<T>) => number;
59
+ export declare namespace sortedIndexBy {
60
+ function indexed<T>(data: ReadonlyArray<T>, item: T, valueFunction: (item: T, index?: number) => NonNullable<unknown>): number;
61
+ function indexed<T>(item: T, valueFunction: (item: T, index?: number) => NonNullable<unknown>): (data: ReadonlyArray<T>) => number;
62
+ }
63
+ //# sourceMappingURL=sorted-index-by.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorted-index-by.d.ts","sourceRoot":"","sources":["../../../src/array/sorted-index-by.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/C,MAAM,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/C,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;AA8BtC,yBAAiB,aAAa,CAAC;IAC7B,SAAgB,OAAO,CAAC,CAAC,EACvB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/D,MAAM,CAAC;IACV,SAAgB,OAAO,CAAC,CAAC,EACvB,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/D,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAIvC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Performs a **binary search** for the index of the item at which the predicate
3
+ * stops returning `true`. This function assumes that the array is "sorted" in
4
+ * regards to the predicate, meaning that running the predicate as a mapper on
5
+ * it would result in an array `[...true[], ...false[]]`.
6
+ * This stricter requirement from the predicate provides us 2 benefits over
7
+ * `findIndex` which does a similar thing:
8
+ * 1. It would run at O(logN) time instead of O(N) time.
9
+ * 2. It always returns a value (it would return `data.length` if the
10
+ * predicate returns `true` for all items).
11
+ *
12
+ * This function is the basis for all other sortedIndex functions which search
13
+ * for a specific item in a sorted array, and it could be used to perform
14
+ * similar efficient searches.
15
+ *
16
+ * @param data - Array, "sorted" by `predicate`
17
+ * @param predicate - A predicate which also defines the array's order
18
+ * @return - Index (In the range 0..data.length)
19
+ *
20
+ * @signature
21
+ * P.sortedIndexWith(data, predicate)
22
+ * @example
23
+ * P.sortedIndexWith(['a','ab','abc'], (item) => item.length < 2) // => 1
24
+ * @dataFirst
25
+ * @indexed
26
+ * @category Array
27
+ *
28
+ * @see findIndex, sortedIndex, sortedIndexBy, sortedLastIndex, sortedLastIndexBy
29
+ */
30
+ export declare function sortedIndexWith<T>(data: ReadonlyArray<T>, predicate: (item: T) => boolean): number;
31
+ /**
32
+ * Performs a **binary search** for the index of the item at which the predicate
33
+ * stops returning `true`. This function assumes that the array is "sorted" in
34
+ * regards to the predicate, meaning that running the predicate as a mapper on
35
+ * it would result in an array `[...true[], ...false[]]`.
36
+ * This stricter requirement from the predicate provides us 2 benefits over
37
+ * `findIndex` which does a similar thing:
38
+ * 1. It would run at O(logN) time instead of O(N) time.
39
+ * 2. It always returns a value (it would return `data.length` if the
40
+ * predicate returns `false` for all items).
41
+ *
42
+ * This function is the basis for all other sortedIndex functions which search
43
+ * for a specific item in a sorted array, and it could be used to perform
44
+ * similar efficient searches.
45
+ *
46
+ * @param data - Array, "sorted" by `predicate`
47
+ * @param predicate - A predicate which also defines the array's order
48
+ * @return - Index (In the range 0..data.length)
49
+ *
50
+ * @signature
51
+ * P.sortedIndexWith(predicate)(data)
52
+ * @example
53
+ * P.pipe(['a','ab','abc'], P.sortedIndexWith((item) => item.length < 2)) // => 1
54
+ * @dataLast
55
+ * @indexed
56
+ * @category Array
57
+ *
58
+ * @see findIndex, sortedIndex, sortedIndexBy, sortedLastIndex, sortedLastIndexBy
59
+ */
60
+ export declare function sortedIndexWith<T>(predicate: (item: T) => boolean): (data: ReadonlyArray<T>) => number;
61
+ export declare namespace sortedIndexWith {
62
+ function indexed<T>(data: ReadonlyArray<T>, predicate: (item: T, index: number) => NonNullable<unknown>): number;
63
+ function indexed<T>(predicate: (item: T, index: number) => NonNullable<unknown>): (data: ReadonlyArray<T>) => number;
64
+ }
65
+ //# sourceMappingURL=sorted-index-with.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorted-index-with.d.ts","sourceRoot":"","sources":["../../../src/array/sorted-index-with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAC9B,MAAM,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAC9B,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;AAMtC,yBAAiB,eAAe,CAAC;IAC/B,SAAgB,OAAO,CAAC,CAAC,EACvB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,WAAW,CAAC,OAAO,CAAC,GAC1D,MAAM,CAAC;IACV,SAAgB,OAAO,CAAC,CAAC,EACvB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,WAAW,CAAC,OAAO,CAAC,GAC1D,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAIvC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Find the insertion position (index) of an item in an array with items sorted
3
+ * in ascending order; so that `splice(sortedIndex, 0, item)` would result in
4
+ * maintaining the array's sort-ness. The array can contain duplicates.
5
+ * If the item already exists in the array the index would be of the *first*
6
+ * occurrence of the item.
7
+ *
8
+ * Runs in O(logN) time.
9
+ *
10
+ * @param data - The (ascending) sorted array.
11
+ * @param item - The item to insert.
12
+ * @return - Insertion index (In the range 0..array.length)
13
+ *
14
+ * @signature
15
+ * P.sortedIndex(data, item)
16
+ * @example
17
+ * P.sortedIndex(['a','a','b','c','c'], 'c') // => 3
18
+ * @dataFirst
19
+ * @category Array
20
+ *
21
+ * @see sortedIndexBy, sortedIndexWith, sortedLastIndex, sortedLastIndexBy
22
+ */
23
+ export declare function sortedIndex<T>(data: ReadonlyArray<T>, item: T): number;
24
+ /**
25
+ * Find the insertion position (index) of an item in an array with items sorted
26
+ * in ascending order; so that `splice(sortedIndex, 0, item)` would result in
27
+ * maintaining the array's sort-ness. The array can contain duplicates.
28
+ * If the item already exists in the array the index would be of the *first*
29
+ * occurrence of the item.
30
+ *
31
+ * Runs in O(logN) time.
32
+ *
33
+ * @param data - The (ascending) sorted array.
34
+ * @param item - The item to insert.
35
+ * @return - Insertion index (In the range 0..array.length)
36
+ *
37
+ * @signature
38
+ * P.sortedIndex(item)(data)
39
+ * @example
40
+ * P.pipe(['a','a','b','c','c'], P.sortedIndex('c')) // => 3
41
+ * @dataLast
42
+ * @category Array
43
+ *
44
+ * @see sortedIndexBy, sortedIndexWith, sortedLastIndex, sortedLastIndexBy
45
+ */
46
+ export declare function sortedIndex<T>(item: T): (data: ReadonlyArray<T>) => number;
47
+ //# sourceMappingURL=sorted-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorted-index.d.ts","sourceRoot":"","sources":["../../../src/array/sorted-index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Find the insertion position (index) of an item in an array with items sorted
3
+ * in ascending order using a value function; so that `splice(sortedIndex, 0, item)`
4
+ * would result in maintaining the arrays sort-ness. The array can contain
5
+ * duplicates.
6
+ * If the item already exists in the array the index would be of the *last*
7
+ * occurrence of the item.
8
+ *
9
+ * Runs in O(logN) time.
10
+ *
11
+ * @param data - The (ascending) sorted array.
12
+ * @param item - The item to insert.
13
+ * @param valueFunction - All comparisons would be performed on the result of
14
+ * calling this function on each compared item. Preferably this function should
15
+ * return a `number` or `string`. This function should be the same as the one
16
+ * provided to sortBy to sort the array.
17
+ * @return - Insertion index (In the range 0..data.length)
18
+ *
19
+ * @signature
20
+ * P.sortedLastIndexBy(data, item, valueFunction)
21
+ * @example
22
+ * P.sortedLastIndexBy([{age:20},{age:22}],{age:21},prop('age')) // => 1
23
+ * @dataFirst
24
+ * @indexed
25
+ * @category Array
26
+ *
27
+ * @see sortedIndex, sortedIndexBy, sortedIndexWith, sortedLastIndex
28
+ */
29
+ export declare function sortedLastIndexBy<T>(data: ReadonlyArray<T>, item: T, valueFunction: (item: T) => NonNullable<unknown>): number;
30
+ /**
31
+ * Find the insertion position (index) of an item in an array with items sorted
32
+ * in ascending order using a value function; so that `splice(sortedIndex, 0, item)`
33
+ * would result in maintaining the arrays sort-ness. The array can contain
34
+ * duplicates.
35
+ * If the item already exists in the array the index would be of the *last*
36
+ * occurrence of the item.
37
+ *
38
+ * Runs in O(logN) time.
39
+ *
40
+ * @param data - The (ascending) sorted array.
41
+ * @param item - The item to insert.
42
+ * @param valueFunction - All comparisons would be performed on the result of
43
+ * calling this function on each compared item. Preferably this function should
44
+ * return a `number` or `string`. This function should be the same as the one
45
+ * provided to sortBy to sort the array.
46
+ * @return - Insertion index (In the range 0..data.length)
47
+ *
48
+ * @signature
49
+ * P.sortedLastIndexBy(item, valueFunction)(data)
50
+ * @example
51
+ * P.pipe([{age:20},{age:22}],sortedLastIndexBy({age:21},prop('age'))) // => 1
52
+ * @dataLast
53
+ * @indexed
54
+ * @category Array
55
+ *
56
+ * @see sortedIndex, sortedIndexBy, sortedIndexWith, sortedLastIndex
57
+ */
58
+ export declare function sortedLastIndexBy<T>(item: T, valueFunction: (item: T) => NonNullable<unknown>): (data: ReadonlyArray<T>) => number;
59
+ export declare namespace sortedLastIndexBy {
60
+ function indexed<T>(data: ReadonlyArray<T>, item: T, valueFunction: (item: T, index?: number) => NonNullable<unknown>): number;
61
+ function indexed<T>(item: T, valueFunction: (item: T, index?: number) => NonNullable<unknown>): (data: ReadonlyArray<T>) => number;
62
+ }
63
+ //# sourceMappingURL=sorted-last-index-by.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorted-last-index-by.d.ts","sourceRoot":"","sources":["../../../src/array/sorted-last-index-by.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/C,MAAM,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/C,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;AAMtC,yBAAiB,iBAAiB,CAAC;IACjC,SAAgB,OAAO,CAAC,CAAC,EACvB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/D,MAAM,CAAC;IACV,SAAgB,OAAO,CAAC,CAAC,EACvB,IAAI,EAAE,CAAC,EACP,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC,OAAO,CAAC,GAC/D,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAIvC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Find the insertion position (index) of an item in an array with items sorted
3
+ * in ascending order; so that `splice(sortedIndex, 0, item)` would result in
4
+ * maintaining the array's sort-ness. The array can contain duplicates.
5
+ * If the item already exists in the array the index would be of the *last*
6
+ * occurrence of the item.
7
+ *
8
+ * Runs in O(logN) time.
9
+ *
10
+ * @param data - The (ascending) sorted array.
11
+ * @param item - The item to insert.
12
+ * @return - Insertion index (In the range 0..data.length)
13
+ *
14
+ * @signature
15
+ * P.sortedLastIndex(data, item)
16
+ * @example
17
+ * P.sortedLastIndex(['a','a','b','c','c'], 'c') // => 5
18
+ * @dataFirst
19
+ * @category Array
20
+ *
21
+ * @see sortedIndex, sortedIndexBy, sortedIndexWith, sortedLastIndexBy
22
+ */
23
+ export declare function sortedLastIndex<T>(data: ReadonlyArray<T>, item: T): number;
24
+ /**
25
+ * Find the insertion position (index) of an item in an array with items sorted
26
+ * in ascending order; so that `splice(sortedIndex, 0, item)` would result in
27
+ * maintaining the array's sort-ness. The array can contain duplicates.
28
+ * If the item already exists in the array the index would be of the *last*
29
+ * occurrence of the item.
30
+ *
31
+ * Runs in O(logN) time.
32
+ *
33
+ * @param data - The (ascending) sorted array.
34
+ * @param item - The item to insert.
35
+ * @return - Insertion index (In the range 0..data.length)
36
+ *
37
+ * @signature
38
+ * P.sortedLastIndex(item)(data)
39
+ * @example
40
+ * P.pipe(['a','a','b','c','c'], sortedLastIndex('c')) // => 5
41
+ * @dataLast
42
+ * @category Array
43
+ *
44
+ * @see sortedIndex, sortedIndexBy, sortedIndexWith, sortedLastIndexBy
45
+ */
46
+ export declare function sortedLastIndex<T>(item: T): (data: ReadonlyArray<T>) => number;
47
+ //# sourceMappingURL=sorted-last-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorted-last-index.d.ts","sourceRoot":"","sources":["../../../src/array/sorted-last-index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sum-by.d.ts","sourceRoot":"","sources":["../../../src/array/sum-by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAC;AAevE;;;;;;;;;;;;;;GAcG;A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aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,MAAM,CAAC;IAEV,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,GACzB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAKxC"}
@@ -1,4 +1,4 @@
1
- import type { LazyResult } from '../utils/reduce-lazy';
1
+ import type { LazyEvaluator } from '../function/pipe';
2
2
  /**
3
3
  * Returns the first `n` elements of `array`.
4
4
  * @param array the array
@@ -25,6 +25,6 @@ export declare function take<T>(array: ReadonlyArray<T>, n: number): Array<T>;
25
25
  */
26
26
  export declare function take<T>(n: number): (array: ReadonlyArray<T>) => Array<T>;
27
27
  export declare namespace take {
28
- function lazy<T>(n: number): (value: T) => LazyResult<T>;
28
+ function lazy<T>(n: number): LazyEvaluator<T>;
29
29
  }
30
30
  //# sourceMappingURL=take.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"take.d.ts","sourceRoot":"","sources":["../../../src/array/take.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD;;;;;;;;;;;GAWG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAU1E,yBAAiB,IAAI,CAAC;IACpB,SAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,WAChB,CAAC,KAAG,WAAW,CAAC,CAAC,CAqBjC;CACF"}
1
+ {"version":3,"file":"take.d.ts","sourceRoot":"","sources":["../../../src/array/take.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD;;;;;;;;;;;GAWG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAU1E,yBAAiB,IAAI,CAAC;IACpB,SAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAUnD;CACF"}
@@ -1,4 +1,4 @@
1
- import type { LazyResult } from '../utils/reduce-lazy';
1
+ import type { LazyEvaluator } from '../function/pipe';
2
2
  type IsEquals<T> = (a: T, b: T) => boolean;
3
3
  /**
4
4
  * Returns a new array containing only one copy of each element in the original list.
@@ -34,9 +34,9 @@ export declare function uniqWith<T>(array: ReadonlyArray<T>, isEquals: IsEquals<
34
34
  * @category Object
35
35
  */
36
36
  export declare function uniqWith<T>(isEquals: IsEquals<T>): (array: ReadonlyArray<T>) => Array<T>;
37
- declare function _lazy<T>(isEquals: IsEquals<T>): (value: T, index?: number, array?: ReadonlyArray<T>) => LazyResult<T>;
37
+ declare function lazy_<T>(isEquals: IsEquals<T>): LazyEvaluator<T>;
38
38
  export declare namespace uniqWith {
39
- const lazy: typeof _lazy & {
39
+ const lazy: typeof lazy_ & {
40
40
  readonly indexed: true;
41
41
  };
42
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"uniq-with.d.ts","sourceRoot":"","sources":["../../../src/array/uniq-with.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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