@vinicunca/perkakas 1.6.0 → 1.7.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 (499) hide show
  1. package/dist/add-prop.cjs +1 -1
  2. package/dist/add-prop.d.cts +1 -1
  3. package/dist/add-prop.d.ts +1 -1
  4. package/dist/add-prop.js +1 -1
  5. package/dist/add.cjs +1 -1
  6. package/dist/add.js +1 -1
  7. package/dist/all-pass.cjs +1 -1
  8. package/dist/all-pass.js +1 -1
  9. package/dist/any-pass.cjs +1 -1
  10. package/dist/any-pass.js +1 -1
  11. package/dist/{array-required-prefix-BW08fIbb.d.cts → array-required-prefix-Ck4lHkbA.d.cts} +3 -5
  12. package/dist/{array-required-prefix-a3sgCkd2.d.ts → array-required-prefix-DXv_WnmG.d.ts} +3 -5
  13. package/dist/{bounded-partial-wqR8ceNQ.d.cts → bounded-partial-BqwRN49U.d.cts} +3 -2
  14. package/dist/{bounded-partial-CJjczH6j.d.ts → bounded-partial-BzynYDVs.d.ts} +3 -2
  15. package/dist/ceil.cjs +1 -1
  16. package/dist/ceil.js +1 -1
  17. package/dist/chunk-3DOG24FJ.cjs +1 -0
  18. package/dist/chunk-4BTTPOEU.cjs +1 -0
  19. package/dist/chunk-4Y6KJJOW.js +1 -0
  20. package/dist/{chunk-BDBX4ZMW.cjs → chunk-76VE5EC6.cjs} +1 -1
  21. package/dist/{chunk-TNA73S2T.cjs → chunk-7C7R7JNX.cjs} +1 -1
  22. package/dist/{chunk-WONMP5WS.js → chunk-7V7IBWP5.js} +1 -1
  23. package/dist/chunk-BKBHW2XJ.js +1 -0
  24. package/dist/chunk-BSNCALDT.cjs +1 -0
  25. package/dist/{chunk-UGWBDJPI.cjs → chunk-D4TUHKBA.cjs} +1 -1
  26. package/dist/chunk-EK7ODJWE.js +1 -0
  27. package/dist/chunk-FIO5FNV2.js +1 -0
  28. package/dist/chunk-FOUZI2Q3.cjs +1 -0
  29. package/dist/chunk-GRKRFDIL.js +1 -0
  30. package/dist/chunk-JYWIRZ2Z.js +1 -0
  31. package/dist/chunk-MBGSSEZN.cjs +1 -0
  32. package/dist/{chunk-GFXNX2W7.js → chunk-MPWQN3WY.js} +1 -1
  33. package/dist/chunk-NHTBBY2L.js +1 -0
  34. package/dist/chunk-NQUTCPKD.js +1 -0
  35. package/dist/chunk-OKBFQ7B6.js +1 -0
  36. package/dist/chunk-P7RCAO7P.cjs +438 -0
  37. package/dist/chunk-QGF2XNZS.cjs +1 -0
  38. package/dist/chunk-RMOD5JNB.cjs +1 -0
  39. package/dist/{chunk-5NW4GR2Q.cjs → chunk-RTFVY5D4.cjs} +1 -1
  40. package/dist/chunk-SG2YWG6U.cjs +1 -0
  41. package/dist/chunk-SXNRBENP.cjs +1 -0
  42. package/dist/chunk-TSP3FU72.cjs +1 -0
  43. package/dist/chunk-TWCEO47X.cjs +1 -0
  44. package/dist/{chunk-L4FN2W5Q.cjs → chunk-TXPRX236.cjs} +1 -1
  45. package/dist/{chunk-3K7SNX4D.cjs → chunk-UURK6I3D.cjs} +1 -1
  46. package/dist/chunk-XCG2UC6T.js +1 -0
  47. package/dist/{chunk-673TXH2U.js → chunk-YRVN4PYH.js} +1 -1
  48. package/dist/chunk-YWIXN5BR.js +1 -0
  49. package/dist/chunk-Z23BZCCD.js +438 -0
  50. package/dist/{chunk-EDZFEURO.js → chunk-Z5YZYBC2.js} +1 -1
  51. package/dist/chunk-Z7D7Q6U3.js +1 -0
  52. package/dist/chunk-ZMG3NQDL.js +1 -0
  53. package/dist/chunk.cjs +1 -1
  54. package/dist/chunk.d.cts +8 -23
  55. package/dist/chunk.d.ts +8 -23
  56. package/dist/chunk.js +1 -1
  57. package/dist/clamp.cjs +1 -1
  58. package/dist/clamp.js +1 -1
  59. package/dist/clone.cjs +1 -1
  60. package/dist/clone.js +1 -1
  61. package/dist/concat.cjs +1 -1
  62. package/dist/concat.js +1 -1
  63. package/dist/conditional.cjs +1 -1
  64. package/dist/conditional.d.cts +133 -43
  65. package/dist/conditional.d.ts +133 -43
  66. package/dist/conditional.js +1 -1
  67. package/dist/constant.cjs +1 -1
  68. package/dist/constant.js +1 -1
  69. package/dist/count-by.cjs +1 -1
  70. package/dist/count-by.d.cts +3 -2
  71. package/dist/count-by.d.ts +3 -2
  72. package/dist/count-by.js +1 -1
  73. package/dist/curry.cjs +1 -1
  74. package/dist/curry.js +1 -1
  75. package/dist/debounce.cjs +1 -1
  76. package/dist/debounce.js +1 -1
  77. package/dist/difference-with.cjs +1 -1
  78. package/dist/difference-with.js +1 -1
  79. package/dist/difference.cjs +1 -1
  80. package/dist/difference.js +1 -1
  81. package/dist/divide.cjs +1 -1
  82. package/dist/divide.js +1 -1
  83. package/dist/do-nothing.cjs +1 -1
  84. package/dist/do-nothing.js +1 -1
  85. package/dist/drop-first-by.cjs +1 -1
  86. package/dist/drop-first-by.d.cts +1 -1
  87. package/dist/drop-first-by.d.ts +1 -1
  88. package/dist/drop-first-by.js +1 -1
  89. package/dist/drop-last-while.cjs +1 -1
  90. package/dist/drop-last-while.js +1 -1
  91. package/dist/drop-last.cjs +1 -1
  92. package/dist/drop-last.js +1 -1
  93. package/dist/drop-while.cjs +1 -1
  94. package/dist/drop-while.js +1 -1
  95. package/dist/drop.cjs +1 -1
  96. package/dist/drop.d.cts +2 -1
  97. package/dist/drop.d.ts +2 -1
  98. package/dist/drop.js +1 -1
  99. package/dist/entries.cjs +1 -1
  100. package/dist/entries.d.cts +8 -5
  101. package/dist/entries.d.ts +8 -5
  102. package/dist/entries.js +1 -1
  103. package/dist/{enumerable-string-key-of-BQ4aR5ep.d.cts → enumerable-string-key-of-C4gsorXe.d.ts} +3 -1
  104. package/dist/{enumerable-string-key-of-BQ4aR5ep.d.ts → enumerable-string-key-of-D8w_3Yg8.d.cts} +3 -1
  105. package/dist/enumerable-string-keyed-value-of-BU9R_cEk.d.cts +9 -0
  106. package/dist/enumerable-string-keyed-value-of-BU9R_cEk.d.ts +9 -0
  107. package/dist/evolve.cjs +1 -1
  108. package/dist/evolve.js +1 -1
  109. package/dist/filter.cjs +1 -1
  110. package/dist/filter.d.cts +4 -4
  111. package/dist/filter.d.ts +4 -4
  112. package/dist/filter.js +1 -1
  113. package/dist/{filtered-array-DX6NNaBq.d.cts → filtered-array-BCjySbC6.d.cts} +1 -1
  114. package/dist/{filtered-array-BNHX1Nwj.d.ts → filtered-array-JKATL39M.d.ts} +1 -1
  115. package/dist/find-index.cjs +1 -1
  116. package/dist/find-index.js +1 -1
  117. package/dist/find-last-index.cjs +1 -1
  118. package/dist/find-last-index.js +1 -1
  119. package/dist/find-last.cjs +1 -1
  120. package/dist/find-last.js +1 -1
  121. package/dist/find.cjs +1 -1
  122. package/dist/find.js +1 -1
  123. package/dist/first-by.cjs +1 -1
  124. package/dist/first-by.d.cts +1 -1
  125. package/dist/first-by.d.ts +1 -1
  126. package/dist/first-by.js +1 -1
  127. package/dist/first.cjs +1 -1
  128. package/dist/first.js +1 -1
  129. package/dist/flat-map.cjs +1 -1
  130. package/dist/flat-map.js +1 -1
  131. package/dist/flat.cjs +1 -1
  132. package/dist/flat.d.cts +2 -5
  133. package/dist/flat.d.ts +2 -5
  134. package/dist/flat.js +1 -1
  135. package/dist/floor.cjs +1 -1
  136. package/dist/floor.js +1 -1
  137. package/dist/for-each-obj.cjs +1 -1
  138. package/dist/for-each-obj.d.cts +3 -2
  139. package/dist/for-each-obj.d.ts +3 -2
  140. package/dist/for-each-obj.js +1 -1
  141. package/dist/for-each.cjs +1 -1
  142. package/dist/for-each.js +1 -1
  143. package/dist/from-entries.cjs +1 -1
  144. package/dist/from-entries.d.cts +4 -2
  145. package/dist/from-entries.d.ts +4 -2
  146. package/dist/from-entries.js +1 -1
  147. package/dist/from-keys.cjs +1 -1
  148. package/dist/from-keys.d.cts +3 -2
  149. package/dist/from-keys.d.ts +3 -2
  150. package/dist/from-keys.js +1 -1
  151. package/dist/funnel.cjs +1 -1
  152. package/dist/funnel.d.cts +7 -7
  153. package/dist/funnel.d.ts +7 -7
  154. package/dist/funnel.js +1 -1
  155. package/dist/funnel.lodash-debounce-with-cached-value.test.cjs +1 -1
  156. package/dist/funnel.lodash-debounce-with-cached-value.test.js +1 -1
  157. package/dist/funnel.lodash-debounce.test.cjs +1 -1
  158. package/dist/funnel.lodash-debounce.test.js +1 -1
  159. package/dist/funnel.lodash-throttle-with-cached-value.test.cjs +1 -1
  160. package/dist/funnel.lodash-throttle-with-cached-value.test.js +1 -1
  161. package/dist/funnel.lodash-throttle.test.cjs +1 -1
  162. package/dist/funnel.lodash-throttle.test.js +1 -1
  163. package/dist/funnel.perkakas-debounce.test.cjs +1 -0
  164. package/dist/funnel.perkakas-debounce.test.js +1 -0
  165. package/dist/funnel.reference-batch.test.cjs +1 -1
  166. package/dist/funnel.reference-batch.test.js +1 -1
  167. package/dist/funnel.test-d.cjs +1 -1
  168. package/dist/funnel.test-d.js +1 -1
  169. package/dist/funnel.test.cjs +1 -1
  170. package/dist/funnel.test.js +1 -1
  171. package/dist/group-by-prop.cjs +1 -1
  172. package/dist/group-by-prop.d.cts +7 -5
  173. package/dist/group-by-prop.d.ts +7 -5
  174. package/dist/group-by-prop.js +1 -1
  175. package/dist/group-by.cjs +1 -1
  176. package/dist/group-by.d.cts +3 -2
  177. package/dist/group-by.d.ts +3 -2
  178. package/dist/group-by.js +1 -1
  179. package/dist/has-at-least.cjs +1 -1
  180. package/dist/has-at-least.d.cts +3 -2
  181. package/dist/has-at-least.d.ts +3 -2
  182. package/dist/has-at-least.js +1 -1
  183. package/dist/has-sub-object.cjs +1 -1
  184. package/dist/has-sub-object.js +1 -1
  185. package/dist/human-readable-file-size.cjs +1 -1
  186. package/dist/human-readable-file-size.js +1 -1
  187. package/dist/identity.cjs +1 -1
  188. package/dist/identity.js +1 -1
  189. package/dist/if-D4QIikQ1.d.cts +5 -0
  190. package/dist/if-D4QIikQ1.d.ts +5 -0
  191. package/dist/index-by.cjs +1 -1
  192. package/dist/index-by.d.cts +3 -2
  193. package/dist/index-by.d.ts +3 -2
  194. package/dist/index-by.js +1 -1
  195. package/dist/index.cjs +1 -1
  196. package/dist/index.d.cts +11 -9
  197. package/dist/index.d.ts +11 -9
  198. package/dist/index.js +1 -1
  199. package/dist/intersection-with.cjs +1 -1
  200. package/dist/intersection-with.js +1 -1
  201. package/dist/intersection.cjs +1 -1
  202. package/dist/intersection.js +1 -1
  203. package/dist/invert.cjs +1 -1
  204. package/dist/invert.d.cts +2 -1
  205. package/dist/invert.d.ts +2 -1
  206. package/dist/invert.js +1 -1
  207. package/dist/is-array.cjs +1 -1
  208. package/dist/is-array.js +1 -1
  209. package/dist/is-big-int.cjs +1 -1
  210. package/dist/is-big-int.js +1 -1
  211. package/dist/is-boolean.cjs +1 -1
  212. package/dist/is-boolean.js +1 -1
  213. package/dist/is-bounded-record-C9WAwfA8.d.cts +30 -0
  214. package/dist/is-bounded-record-C9WAwfA8.d.ts +30 -0
  215. package/dist/is-date.cjs +1 -1
  216. package/dist/is-date.js +1 -1
  217. package/dist/is-deep-equal.cjs +1 -1
  218. package/dist/is-deep-equal.js +1 -1
  219. package/dist/is-defined.cjs +1 -1
  220. package/dist/is-defined.js +1 -1
  221. package/dist/is-empty.cjs +1 -1
  222. package/dist/is-empty.js +1 -1
  223. package/dist/is-error.cjs +1 -1
  224. package/dist/is-error.js +1 -1
  225. package/dist/is-function.cjs +1 -1
  226. package/dist/is-function.js +1 -1
  227. package/dist/is-included-in.cjs +1 -1
  228. package/dist/is-included-in.js +1 -1
  229. package/dist/is-non-null.cjs +1 -1
  230. package/dist/is-non-null.js +1 -1
  231. package/dist/is-non-nullish.cjs +1 -1
  232. package/dist/is-non-nullish.js +1 -1
  233. package/dist/is-not.cjs +1 -1
  234. package/dist/is-not.js +1 -1
  235. package/dist/is-nullish.cjs +1 -1
  236. package/dist/is-nullish.js +1 -1
  237. package/dist/is-number.cjs +1 -1
  238. package/dist/is-number.js +1 -1
  239. package/dist/is-object-type.cjs +1 -1
  240. package/dist/is-object-type.js +1 -1
  241. package/dist/is-plain-object.cjs +1 -1
  242. package/dist/is-plain-object.js +1 -1
  243. package/dist/is-promise.cjs +1 -1
  244. package/dist/is-promise.js +1 -1
  245. package/dist/is-shallow-equal.cjs +1 -1
  246. package/dist/is-shallow-equal.js +1 -1
  247. package/dist/is-strict-equal.cjs +1 -1
  248. package/dist/is-strict-equal.js +1 -1
  249. package/dist/is-string.cjs +1 -1
  250. package/dist/is-string.js +1 -1
  251. package/dist/is-symbol.cjs +1 -1
  252. package/dist/is-symbol.js +1 -1
  253. package/dist/is-truthy.cjs +1 -1
  254. package/dist/is-truthy.js +1 -1
  255. package/dist/join.cjs +1 -1
  256. package/dist/join.js +1 -1
  257. package/dist/key-codes.cjs +1 -1
  258. package/dist/key-codes.js +1 -1
  259. package/dist/keys.cjs +1 -1
  260. package/dist/keys.d.cts +4 -3
  261. package/dist/keys.d.ts +4 -3
  262. package/dist/keys.js +1 -1
  263. package/dist/last.cjs +1 -1
  264. package/dist/last.js +1 -1
  265. package/dist/length.cjs +1 -1
  266. package/dist/length.js +1 -1
  267. package/dist/magic-string.es-2ADFIHOO.cjs +13 -0
  268. package/dist/magic-string.es-PNCTE22R.js +13 -0
  269. package/dist/map-keys.cjs +1 -1
  270. package/dist/map-keys.d.cts +6 -4
  271. package/dist/map-keys.d.ts +6 -4
  272. package/dist/map-keys.js +1 -1
  273. package/dist/map-to-obj.cjs +1 -1
  274. package/dist/map-to-obj.d.cts +30 -12
  275. package/dist/map-to-obj.d.ts +30 -12
  276. package/dist/map-to-obj.js +1 -1
  277. package/dist/map-values.cjs +1 -1
  278. package/dist/map-values.d.cts +3 -2
  279. package/dist/map-values.d.ts +3 -2
  280. package/dist/map-values.js +1 -1
  281. package/dist/map-with-feedback.cjs +1 -1
  282. package/dist/map-with-feedback.js +1 -1
  283. package/dist/map.cjs +1 -1
  284. package/dist/map.js +1 -1
  285. package/dist/mean-by.cjs +1 -1
  286. package/dist/mean-by.js +1 -1
  287. package/dist/merge-all.cjs +1 -1
  288. package/dist/merge-all.d.cts +2 -1
  289. package/dist/merge-all.d.ts +2 -1
  290. package/dist/merge-all.js +1 -1
  291. package/dist/merge-deep.cjs +1 -1
  292. package/dist/merge-deep.js +1 -1
  293. package/dist/merge.cjs +1 -1
  294. package/dist/merge.js +1 -1
  295. package/dist/multiply.cjs +1 -1
  296. package/dist/multiply.js +1 -1
  297. package/dist/nth-by.cjs +1 -1
  298. package/dist/nth-by.d.cts +1 -1
  299. package/dist/nth-by.d.ts +1 -1
  300. package/dist/nth-by.js +1 -1
  301. package/dist/obj-of.cjs +1 -1
  302. package/dist/obj-of.js +1 -1
  303. package/dist/omit-by.cjs +1 -1
  304. package/dist/omit-by.d.cts +7 -6
  305. package/dist/omit-by.d.ts +7 -6
  306. package/dist/omit-by.js +1 -1
  307. package/dist/omit.cjs +1 -1
  308. package/dist/omit.js +1 -1
  309. package/dist/once.cjs +1 -1
  310. package/dist/once.js +1 -1
  311. package/dist/only.cjs +1 -1
  312. package/dist/only.js +1 -1
  313. package/dist/partition.cjs +1 -1
  314. package/dist/partition.js +1 -1
  315. package/dist/path-or.cjs +1 -1
  316. package/dist/path-or.js +1 -1
  317. package/dist/perkakas-type-error-8wPb8T2y.d.cts +17 -0
  318. package/dist/perkakas-type-error-8wPb8T2y.d.ts +17 -0
  319. package/dist/pick-by.cjs +1 -1
  320. package/dist/pick-by.d.cts +11 -11
  321. package/dist/pick-by.d.ts +11 -11
  322. package/dist/pick-by.js +1 -1
  323. package/dist/pick.cjs +1 -1
  324. package/dist/pick.d.cts +52 -7
  325. package/dist/pick.d.ts +52 -7
  326. package/dist/pick.js +1 -1
  327. package/dist/pipe.cjs +1 -1
  328. package/dist/pipe.js +1 -1
  329. package/dist/piped.cjs +1 -1
  330. package/dist/piped.js +1 -1
  331. package/dist/product.cjs +1 -1
  332. package/dist/product.js +1 -1
  333. package/dist/prop.cjs +1 -1
  334. package/dist/prop.js +1 -1
  335. package/dist/pull-object.cjs +1 -1
  336. package/dist/pull-object.d.cts +3 -2
  337. package/dist/pull-object.d.ts +3 -2
  338. package/dist/pull-object.js +1 -1
  339. package/dist/random-integer.cjs +1 -1
  340. package/dist/random-integer.js +1 -1
  341. package/dist/random-string.cjs +1 -1
  342. package/dist/random-string.js +1 -1
  343. package/dist/range.cjs +1 -1
  344. package/dist/range.js +1 -1
  345. package/dist/rank-by.cjs +1 -1
  346. package/dist/rank-by.d.cts +1 -1
  347. package/dist/rank-by.d.ts +1 -1
  348. package/dist/rank-by.js +1 -1
  349. package/dist/reduce.cjs +1 -1
  350. package/dist/reduce.js +1 -1
  351. package/dist/reverse.cjs +1 -1
  352. package/dist/reverse.js +1 -1
  353. package/dist/round.cjs +1 -1
  354. package/dist/round.js +1 -1
  355. package/dist/sample.cjs +1 -1
  356. package/dist/sample.js +1 -1
  357. package/dist/set-path.cjs +1 -1
  358. package/dist/set-path.d.cts +18 -7
  359. package/dist/set-path.d.ts +18 -7
  360. package/dist/set-path.js +1 -1
  361. package/dist/set.cjs +1 -1
  362. package/dist/set.d.cts +1 -1
  363. package/dist/set.d.ts +1 -1
  364. package/dist/set.js +1 -1
  365. package/dist/shuffle.cjs +1 -1
  366. package/dist/shuffle.js +1 -1
  367. package/dist/sleep.cjs +1 -1
  368. package/dist/sleep.js +1 -1
  369. package/dist/slice-string.cjs +1 -1
  370. package/dist/slice-string.js +1 -1
  371. package/dist/slugify.cjs +1 -1
  372. package/dist/slugify.js +1 -1
  373. package/dist/sort-by.cjs +1 -1
  374. package/dist/sort-by.js +1 -1
  375. package/dist/sort.cjs +1 -1
  376. package/dist/sort.js +1 -1
  377. package/dist/sorted-index-by.cjs +1 -1
  378. package/dist/sorted-index-by.js +1 -1
  379. package/dist/sorted-index-with.cjs +1 -1
  380. package/dist/sorted-index-with.js +1 -1
  381. package/dist/sorted-index.cjs +1 -1
  382. package/dist/sorted-index.js +1 -1
  383. package/dist/sorted-last-index-by.cjs +1 -1
  384. package/dist/sorted-last-index-by.js +1 -1
  385. package/dist/sorted-last-index.cjs +1 -1
  386. package/dist/sorted-last-index.js +1 -1
  387. package/dist/splice.cjs +1 -1
  388. package/dist/splice.js +1 -1
  389. package/dist/split-at.cjs +1 -1
  390. package/dist/split-at.js +1 -1
  391. package/dist/split-when.cjs +1 -1
  392. package/dist/split-when.js +1 -1
  393. package/dist/split.cjs +1 -1
  394. package/dist/split.js +1 -1
  395. package/dist/string-to-path.cjs +1 -1
  396. package/dist/string-to-path.d.cts +33 -11
  397. package/dist/string-to-path.d.ts +33 -11
  398. package/dist/string-to-path.js +1 -1
  399. package/dist/subtract.cjs +1 -1
  400. package/dist/subtract.js +1 -1
  401. package/dist/sum-by.cjs +1 -1
  402. package/dist/sum-by.js +1 -1
  403. package/dist/sum.cjs +1 -1
  404. package/dist/sum.js +1 -1
  405. package/dist/swap-indices.cjs +1 -1
  406. package/dist/swap-indices.js +1 -1
  407. package/dist/swap-props.cjs +1 -1
  408. package/dist/swap-props.js +1 -1
  409. package/dist/take-first-by.cjs +1 -1
  410. package/dist/take-first-by.d.cts +1 -1
  411. package/dist/take-first-by.d.ts +1 -1
  412. package/dist/take-first-by.js +1 -1
  413. package/dist/take-last-while.cjs +1 -1
  414. package/dist/take-last-while.js +1 -1
  415. package/dist/take-last.cjs +1 -1
  416. package/dist/take-last.js +1 -1
  417. package/dist/take-while.cjs +1 -1
  418. package/dist/take-while.js +1 -1
  419. package/dist/take.cjs +1 -1
  420. package/dist/take.js +1 -1
  421. package/dist/tap.cjs +1 -1
  422. package/dist/tap.js +1 -1
  423. package/dist/times.cjs +1 -1
  424. package/dist/times.d.cts +1 -9
  425. package/dist/times.d.ts +1 -9
  426. package/dist/times.js +1 -1
  427. package/dist/to-camel-case.cjs +1 -1
  428. package/dist/to-camel-case.js +1 -1
  429. package/dist/to-capital-case.cjs +1 -1
  430. package/dist/to-capital-case.js +1 -1
  431. package/dist/to-constant-case.cjs +1 -1
  432. package/dist/to-constant-case.js +1 -1
  433. package/dist/to-kebab-case.cjs +1 -1
  434. package/dist/to-kebab-case.js +1 -1
  435. package/dist/to-no-case.cjs +1 -1
  436. package/dist/to-no-case.js +1 -1
  437. package/dist/to-pascal-case.cjs +1 -1
  438. package/dist/to-pascal-case.js +1 -1
  439. package/dist/to-pascal-snake-case.cjs +1 -1
  440. package/dist/to-pascal-snake-case.js +1 -1
  441. package/dist/to-sentence-case.cjs +1 -1
  442. package/dist/to-sentence-case.js +1 -1
  443. package/dist/to-snake-case.cjs +1 -1
  444. package/dist/to-snake-case.js +1 -1
  445. package/dist/to-string-DO8zw6jS.d.cts +11 -0
  446. package/dist/to-string-DO8zw6jS.d.ts +11 -0
  447. package/dist/to-train-case.cjs +1 -1
  448. package/dist/to-train-case.js +1 -1
  449. package/dist/{tuple-parts-CrwnkDKX.d.ts → tuple-parts-BTivqbtT.d.ts} +4 -18
  450. package/dist/{tuple-parts-DAqFAJP8.d.cts → tuple-parts-v6av7LMU.d.cts} +4 -18
  451. package/dist/unique-by.cjs +1 -1
  452. package/dist/unique-by.js +1 -1
  453. package/dist/unique-with.cjs +1 -1
  454. package/dist/unique-with.js +1 -1
  455. package/dist/unique.cjs +1 -1
  456. package/dist/unique.js +1 -1
  457. package/dist/{upsert-prop-tIHFi_F_.d.cts → upsert-prop-Cc3jEW9l.d.cts} +1 -2
  458. package/dist/{upsert-prop-D0N8486l.d.ts → upsert-prop-CdUtD50i.d.ts} +1 -2
  459. package/dist/values.cjs +1 -1
  460. package/dist/values.d.cts +1 -1
  461. package/dist/values.d.ts +1 -1
  462. package/dist/values.js +1 -1
  463. package/dist/zip-with.cjs +1 -1
  464. package/dist/zip-with.js +1 -1
  465. package/dist/zip.cjs +1 -1
  466. package/dist/zip.js +1 -1
  467. package/package.json +12 -12
  468. package/dist/chunk-5SAUYUEK.js +0 -1
  469. package/dist/chunk-6HSB3NFW.js +0 -1
  470. package/dist/chunk-6L5XEBJG.js +0 -1
  471. package/dist/chunk-A2PAJNYA.js +0 -1
  472. package/dist/chunk-AWXJSK4F.js +0 -1
  473. package/dist/chunk-CZLV6ZLZ.js +0 -1
  474. package/dist/chunk-F3JXHUP4.cjs +0 -1
  475. package/dist/chunk-FMUPPQZE.js +0 -1
  476. package/dist/chunk-FP3LV577.js +0 -1
  477. package/dist/chunk-GFQXVPLP.cjs +0 -1
  478. package/dist/chunk-GOUUMCT7.cjs +0 -1
  479. package/dist/chunk-HRK4GMT2.cjs +0 -1
  480. package/dist/chunk-ICYGL2YZ.js +0 -1
  481. package/dist/chunk-J3ZXNDMT.cjs +0 -1
  482. package/dist/chunk-MBC7VZHY.js +0 -1
  483. package/dist/chunk-NQGMUM3E.cjs +0 -1
  484. package/dist/chunk-OBWPUDD3.cjs +0 -1
  485. package/dist/chunk-SQZULO7V.js +0 -1
  486. package/dist/chunk-UDSRBKNR.js +0 -1
  487. package/dist/chunk-VRZNQSZN.cjs +0 -1
  488. package/dist/chunk-WYM2JV5T.cjs +0 -1
  489. package/dist/chunk-XU4TDKMD.cjs +0 -1
  490. package/dist/enumerable-string-keyed-value-of-CLzltniW.d.cts +0 -15
  491. package/dist/enumerable-string-keyed-value-of-CLzltniW.d.ts +0 -15
  492. package/dist/funnel.remeda-debounce.test.cjs +0 -1
  493. package/dist/funnel.remeda-debounce.test.js +0 -1
  494. package/dist/if-bounded-record-Drd4UbBU.d.cts +0 -29
  495. package/dist/if-bounded-record-Drd4UbBU.d.ts +0 -29
  496. package/dist/reconstructed-record-DchLaSO8.d.cts +0 -10
  497. package/dist/reconstructed-record-DuxOLlMs.d.ts +0 -10
  498. /package/dist/{funnel.remeda-debounce.test.d.cts → funnel.perkakas-debounce.test.d.cts} +0 -0
  499. /package/dist/{funnel.remeda-debounce.test.d.ts → funnel.perkakas-debounce.test.d.ts} +0 -0
package/dist/omit-by.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  import { Simplify, IfNever } from 'type-fest';
2
- import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-BQ4aR5ep.js';
3
- import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-CLzltniW.js';
4
- import { I as IfBoundedRecord } from './if-bounded-record-Drd4UbBU.js';
5
- import { R as ReconstructedRecord } from './reconstructed-record-DuxOLlMs.js';
2
+ import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-C4gsorXe.js';
3
+ import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-BU9R_cEk.js';
4
+ import { I as If } from './if-D4QIikQ1.js';
5
+ import { I as IsBoundedRecord } from './is-bounded-record-C9WAwfA8.js';
6
+ import './to-string-DO8zw6jS.js';
6
7
 
7
8
  type PickSymbolKeys<T extends object> = {
8
9
  -readonly [P in keyof T as P extends symbol ? P : never]: T[P];
9
10
  };
10
- type PartialEnumerableKeys<T extends object> = T extends unknown ? Simplify<IfBoundedRecord<T, PickSymbolKeys<T> & {
11
+ type PartialEnumerableKeys<T extends object> = T extends unknown ? Simplify<If<IsBoundedRecord<T>, PickSymbolKeys<T> & {
11
12
  -readonly [P in keyof T as P extends symbol ? never : P]?: Required<T>[P];
12
- }, ReconstructedRecord<T>>> : never;
13
+ }, Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>>> : never;
13
14
  type PartialEnumerableKeysNarrowed<T extends object, S> = Simplify<ExactProps<T, S> & PartialProps<T, S> & PickSymbolKeys<T>>;
14
15
  type ExactProps<T, S> = {
15
16
  -readonly [P in keyof T as IsExactProp<T, P, S> extends true ? P : never]: Exclude<T[P], S>;
package/dist/omit-by.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-SQZULO7V.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as omitBy};
1
+ import{a}from"./chunk-FIO5FNV2.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as omitBy};
package/dist/omit.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOMHZCALNcjs = require('./chunk-OMHZCALN.cjs');require('./chunk-66JP4PUG.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.omit = _chunkOMHZCALNcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOMHZCALNcjs = require('./chunk-OMHZCALN.cjs');require('./chunk-66JP4PUG.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.omit = _chunkOMHZCALNcjs.a;
package/dist/omit.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-VI2QG3FU.js";import"./chunk-ITDJLXHO.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as omit};
1
+ import{a}from"./chunk-VI2QG3FU.js";import"./chunk-ITDJLXHO.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as omit};
package/dist/once.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJRDQRETRcjs = require('./chunk-JRDQRETR.cjs');exports.once = _chunkJRDQRETRcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJRDQRETRcjs = require('./chunk-JRDQRETR.cjs');require('./chunk-MBGSSEZN.cjs');exports.once = _chunkJRDQRETRcjs.a;
package/dist/once.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-C6IMN7SF.js";export{a as once};
1
+ import{a}from"./chunk-C6IMN7SF.js";import"./chunk-EK7ODJWE.js";export{a as once};
package/dist/only.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA3EBULR7cjs = require('./chunk-A3EBULR7.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.only = _chunkA3EBULR7cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA3EBULR7cjs = require('./chunk-A3EBULR7.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.only = _chunkA3EBULR7cjs.a;
package/dist/only.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-HR2LFFYB.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as only};
1
+ import{a}from"./chunk-HR2LFFYB.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as only};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL7WDY53Icjs = require('./chunk-L7WDY53I.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.partition = _chunkL7WDY53Icjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL7WDY53Icjs = require('./chunk-L7WDY53I.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.partition = _chunkL7WDY53Icjs.a;
package/dist/partition.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-6GEID3HE.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as partition};
1
+ import{a}from"./chunk-6GEID3HE.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as partition};
package/dist/path-or.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk25CFIH7Lcjs = require('./chunk-25CFIH7L.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.pathOr = _chunk25CFIH7Lcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk25CFIH7Lcjs = require('./chunk-25CFIH7L.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.pathOr = _chunk25CFIH7Lcjs.a;
package/dist/path-or.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-N6GBVESU.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as pathOr};
1
+ import{a}from"./chunk-N6GBVESU.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as pathOr};
@@ -0,0 +1,17 @@
1
+ import { Tagged } from 'type-fest';
2
+
3
+ declare const PerkakasErrorSymbol: unique symbol;
4
+ interface PerkakasTypeErrorOptions {
5
+ type?: unknown;
6
+ metadata?: unknown;
7
+ }
8
+ /**
9
+ * Used for reporting type errors in a more useful way than `never`.
10
+ */
11
+ type PerkakasTypeError<FunctionName extends string, Message extends number | string, Options extends PerkakasTypeErrorOptions = {}> = Tagged<Options extends {
12
+ type: infer T;
13
+ } ? T : typeof PerkakasErrorSymbol, `PerkakasTypeError(${FunctionName}): ${Message}.`, Options extends {
14
+ metadata: infer Metadata;
15
+ } ? Metadata : never>;
16
+
17
+ export type { PerkakasTypeError as P };
@@ -0,0 +1,17 @@
1
+ import { Tagged } from 'type-fest';
2
+
3
+ declare const PerkakasErrorSymbol: unique symbol;
4
+ interface PerkakasTypeErrorOptions {
5
+ type?: unknown;
6
+ metadata?: unknown;
7
+ }
8
+ /**
9
+ * Used for reporting type errors in a more useful way than `never`.
10
+ */
11
+ type PerkakasTypeError<FunctionName extends string, Message extends number | string, Options extends PerkakasTypeErrorOptions = {}> = Tagged<Options extends {
12
+ type: infer T;
13
+ } ? T : typeof PerkakasErrorSymbol, `PerkakasTypeError(${FunctionName}): ${Message}.`, Options extends {
14
+ metadata: infer Metadata;
15
+ } ? Metadata : never>;
16
+
17
+ export type { PerkakasTypeError as P };
package/dist/pick-by.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGSBNZGMOcjs = require('./chunk-GSBNZGMO.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.pickBy = _chunkGSBNZGMOcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGSBNZGMOcjs = require('./chunk-GSBNZGMO.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.pickBy = _chunkGSBNZGMOcjs.a;
@@ -1,19 +1,19 @@
1
1
  import { Simplify, IfNever } from 'type-fest';
2
- import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-BQ4aR5ep.cjs';
3
- import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-CLzltniW.cjs';
4
- import { I as IfBoundedRecord } from './if-bounded-record-Drd4UbBU.cjs';
5
- import { R as ReconstructedRecord } from './reconstructed-record-DchLaSO8.cjs';
2
+ import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-D8w_3Yg8.cjs';
3
+ import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-BU9R_cEk.cjs';
4
+ import { I as If } from './if-D4QIikQ1.cjs';
5
+ import { I as IsBoundedRecord } from './is-bounded-record-C9WAwfA8.cjs';
6
+ import { T as ToString } from './to-string-DO8zw6jS.cjs';
6
7
 
7
- type EnumerableKey<T> = `${T extends number | string ? T : never}`;
8
- type EnumeratedPartial<T> = T extends unknown ? Simplify<IfBoundedRecord<T, {
9
- -readonly [P in keyof T as EnumerableKey<P>]?: Required<T>[P];
10
- }, ReconstructedRecord<T>>> : never;
11
- type EnumeratedPartialNarrowed<T, S> = Simplify<ExactProps<T, S> & PartialProps<T, S>>;
8
+ type EnumeratedPartial<T> = T extends unknown ? Simplify<If<IsBoundedRecord<T>, {
9
+ -readonly [P in keyof T as ToString<P>]?: Required<T>[P];
10
+ }, Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>>> : never;
11
+ type EnumeratedPartialNarrowed<T, S> = T extends unknown ? Simplify<If<IsBoundedRecord<T>, ExactProps<T, S> & PartialProps<T, S>, Record<EnumerableStringKeyOf<T>, Extract<EnumerableStringKeyedValueOf<T>, S>>>> : never;
12
12
  type ExactProps<T, S> = {
13
- -readonly [P in keyof T as EnumerableKey<IsExactProp<T, P, S> extends true ? P : never>]: Extract<Required<T>[P], S>;
13
+ -readonly [P in keyof T as ToString<IsExactProp<T, P, S> extends true ? P : never>]: Extract<Required<T>[P], S>;
14
14
  };
15
15
  type PartialProps<T, S> = {
16
- -readonly [P in keyof T as EnumerableKey<IsPartialProp<T, P, S> extends true ? P : never>]?: IfNever<Extract<T[P], S>, S extends T[P] ? S : never, Extract<T[P], S>>;
16
+ -readonly [P in keyof T as ToString<IsPartialProp<T, P, S> extends true ? P : never>]?: IfNever<Extract<T[P], S>, S extends T[P] ? S : never, Extract<T[P], S>>;
17
17
  };
18
18
  type IsExactProp<T, P extends keyof T, S> = T[P] extends Extract<T[P], S> ? true : false;
19
19
  type IsPartialProp<T, P extends keyof T, S> = IsExactProp<T, P, S> extends true ? false : IfNever<Extract<T[P], S>, S extends T[P] ? true : false, true>;
package/dist/pick-by.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import { Simplify, IfNever } from 'type-fest';
2
- import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-BQ4aR5ep.js';
3
- import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-CLzltniW.js';
4
- import { I as IfBoundedRecord } from './if-bounded-record-Drd4UbBU.js';
5
- import { R as ReconstructedRecord } from './reconstructed-record-DuxOLlMs.js';
2
+ import { E as EnumerableStringKeyOf } from './enumerable-string-key-of-C4gsorXe.js';
3
+ import { E as EnumerableStringKeyedValueOf } from './enumerable-string-keyed-value-of-BU9R_cEk.js';
4
+ import { I as If } from './if-D4QIikQ1.js';
5
+ import { I as IsBoundedRecord } from './is-bounded-record-C9WAwfA8.js';
6
+ import { T as ToString } from './to-string-DO8zw6jS.js';
6
7
 
7
- type EnumerableKey<T> = `${T extends number | string ? T : never}`;
8
- type EnumeratedPartial<T> = T extends unknown ? Simplify<IfBoundedRecord<T, {
9
- -readonly [P in keyof T as EnumerableKey<P>]?: Required<T>[P];
10
- }, ReconstructedRecord<T>>> : never;
11
- type EnumeratedPartialNarrowed<T, S> = Simplify<ExactProps<T, S> & PartialProps<T, S>>;
8
+ type EnumeratedPartial<T> = T extends unknown ? Simplify<If<IsBoundedRecord<T>, {
9
+ -readonly [P in keyof T as ToString<P>]?: Required<T>[P];
10
+ }, Record<EnumerableStringKeyOf<T>, EnumerableStringKeyedValueOf<T>>>> : never;
11
+ type EnumeratedPartialNarrowed<T, S> = T extends unknown ? Simplify<If<IsBoundedRecord<T>, ExactProps<T, S> & PartialProps<T, S>, Record<EnumerableStringKeyOf<T>, Extract<EnumerableStringKeyedValueOf<T>, S>>>> : never;
12
12
  type ExactProps<T, S> = {
13
- -readonly [P in keyof T as EnumerableKey<IsExactProp<T, P, S> extends true ? P : never>]: Extract<Required<T>[P], S>;
13
+ -readonly [P in keyof T as ToString<IsExactProp<T, P, S> extends true ? P : never>]: Extract<Required<T>[P], S>;
14
14
  };
15
15
  type PartialProps<T, S> = {
16
- -readonly [P in keyof T as EnumerableKey<IsPartialProp<T, P, S> extends true ? P : never>]?: IfNever<Extract<T[P], S>, S extends T[P] ? S : never, Extract<T[P], S>>;
16
+ -readonly [P in keyof T as ToString<IsPartialProp<T, P, S> extends true ? P : never>]?: IfNever<Extract<T[P], S>, S extends T[P] ? S : never, Extract<T[P], S>>;
17
17
  };
18
18
  type IsExactProp<T, P extends keyof T, S> = T[P] extends Extract<T[P], S> ? true : false;
19
19
  type IsPartialProp<T, P extends keyof T, S> = IsExactProp<T, P, S> extends true ? false : IfNever<Extract<T[P], S>, S extends T[P] ? true : false, true>;
package/dist/pick-by.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-SWZW76TE.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as pickBy};
1
+ import{a}from"./chunk-SWZW76TE.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as pickBy};
package/dist/pick.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHRK4GMT2cjs = require('./chunk-HRK4GMT2.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.pick = _chunkHRK4GMT2cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFOUZI2Q3cjs = require('./chunk-FOUZI2Q3.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.pick = _chunkFOUZI2Q3cjs.a;
package/dist/pick.d.cts CHANGED
@@ -1,25 +1,70 @@
1
+ import { KeysOfUnion, IsNever, EmptyObject, Writable } from 'type-fest';
2
+ import { I as If } from './if-D4QIikQ1.cjs';
3
+ import { I as IsBoundedRecord, a as IsBounded } from './is-bounded-record-C9WAwfA8.cjs';
4
+ import { I as IsUnion } from './is-union-Bx34mF34.cjs';
5
+ import { T as TupleParts } from './tuple-parts-v6av7LMU.cjs';
6
+ import './iterable-container-BTpDVdNc.cjs';
7
+ import './perkakas-type-error-8wPb8T2y.cjs';
8
+
9
+ type PickFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>> = T extends unknown ? Keys extends unknown ? If<IsNever<Extract<Keys[number], keyof T>>, EmptyObject, Writable<If<IsBoundedRecord<T>, PickBoundedFromArray<T, Keys>, PickUnbounded<T, Extract<Keys[number], keyof T>>>>> : never : never;
10
+ /**
11
+ * Bounded records have bounded keys and result in a bounded output. The only
12
+ * question left is whether to add the prop as-is, or make it optional. This
13
+ * can be determined by the part of the keys array the prop is defined in, and
14
+ * the way that element is defined: if the array contains a singular literal
15
+ * key in either the required prefix or the suffix, we know that prop should be
16
+ * picked as-is, otherwise, the key might not be present in the keys array so it
17
+ * can only be picked optionally.
18
+ */
19
+ type PickBoundedFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>> = Pick<T, Extract<ItemsByUnion<TupleParts<Keys>['required']>['singular'] | ItemsByUnion<TupleParts<Keys>['suffix']>['singular'], keyof T>> & Partial<Pick<T, Extract<ItemsByUnion<TupleParts<Keys>['required']>['union'] | TupleParts<Keys>['optional'][number] | TupleParts<Keys>['item'] | ItemsByUnion<TupleParts<Keys>['suffix']>['union'], keyof T>>>;
20
+ /**
21
+ * We split the fixed tuple item types into **singular** props (e.g., `"a"`),
22
+ * and unions of several props (e.g., `"a" | "b"`).
23
+ *
24
+ * We assume that T is a fixed tuple (no optional or rest elements), and that
25
+ * all elements in it are bounded (as defined by `IsBounded`).
26
+ */
27
+ type ItemsByUnion<T, Singular = never, Union = never> = T extends readonly [
28
+ infer Head,
29
+ ...infer Rest
30
+ ] ? If<IsUnion<Head>, ItemsByUnion<Rest, Singular, Union | Head>, ItemsByUnion<Rest, Singular | Head, Union>> : {
31
+ singular: Singular;
32
+ union: Union;
33
+ };
34
+ /**
35
+ * The built-in `Pick` is weird when it comes to picking bounded keys from
36
+ * unbounded records. It reconstructs the output object regardless of the shape
37
+ * of the input: `Pick<Record<string, "world">, "hello">` results in the type
38
+ * `{ hello: "world" }`, but you'd expect it to be optional because we don't
39
+ * know if the record contains a `hello` prop or not!
40
+ *
41
+ * !Important: We assume T is unbounded and don't test for it!
42
+ *
43
+ * See: https://www.typescriptlang.org/play/?#code/PTAEE0HsFcHIBNQFMAeAHJBjALqAGqNpKAEZKigAGA3qABZIA2jkA-AFygBEA7pAE6N4XUAF9KAGlLRcAQ0ayAzgChsATwz5QAXlAAFAJaYA1gB4ASlgHxTi7PwMA7AOZTeAoVwB8bhs0jeANzKIBSgAHqsykA.
44
+ */
45
+ type PickUnbounded<T, Keys extends keyof T> = If<IsBounded<Keys>, Partial<Pick<T, Keys>>, Pick<T, Keys>>;
1
46
  /**
2
- * Creates an object composed of the picked `object` properties.
47
+ * Creates an object composed of the picked `data` properties.
3
48
  *
4
- * @param names - The properties names.
49
+ * @param keys - The property names.
5
50
  * @signature P.pick([prop1, prop2])(object)
6
51
  * @example
7
52
  * P.pipe({ a: 1, b: 2, c: 3, d: 4 }, P.pick(['a', 'd'])) // => { a: 1, d: 4 }
8
53
  * @dataLast
9
54
  * @category Object
10
55
  */
11
- declare function pick<T extends object, K extends keyof T>(names: ReadonlyArray<K>): (object: T) => Pick<T, K>;
56
+ declare function pick<T extends object, const Keys extends ReadonlyArray<KeysOfUnion<T>>>(keys: Keys): (data: T) => PickFromArray<T, Keys>;
12
57
  /**
13
- * Creates an object composed of the picked `object` properties.
58
+ * Creates an object composed of the picked `data` properties.
14
59
  *
15
- * @param object - The target object.
16
- * @param names - The properties names.
60
+ * @param data - The target object.
61
+ * @param keys - The property names.
17
62
  * @signature P.pick(object, [prop1, prop2])
18
63
  * @example
19
64
  * P.pick({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { a: 1, d: 4 }
20
65
  * @dataFirst
21
66
  * @category Object
22
67
  */
23
- declare function pick<T extends object, K extends keyof T>(object: T, names: ReadonlyArray<K>): Pick<T, K>;
68
+ declare function pick<T extends object, const Keys extends ReadonlyArray<KeysOfUnion<T>>>(data: T, keys: Keys): PickFromArray<T, Keys>;
24
69
 
25
70
  export { pick };
package/dist/pick.d.ts CHANGED
@@ -1,25 +1,70 @@
1
+ import { KeysOfUnion, IsNever, EmptyObject, Writable } from 'type-fest';
2
+ import { I as If } from './if-D4QIikQ1.js';
3
+ import { I as IsBoundedRecord, a as IsBounded } from './is-bounded-record-C9WAwfA8.js';
4
+ import { I as IsUnion } from './is-union-Bx34mF34.js';
5
+ import { T as TupleParts } from './tuple-parts-BTivqbtT.js';
6
+ import './iterable-container-BTpDVdNc.js';
7
+ import './perkakas-type-error-8wPb8T2y.js';
8
+
9
+ type PickFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>> = T extends unknown ? Keys extends unknown ? If<IsNever<Extract<Keys[number], keyof T>>, EmptyObject, Writable<If<IsBoundedRecord<T>, PickBoundedFromArray<T, Keys>, PickUnbounded<T, Extract<Keys[number], keyof T>>>>> : never : never;
10
+ /**
11
+ * Bounded records have bounded keys and result in a bounded output. The only
12
+ * question left is whether to add the prop as-is, or make it optional. This
13
+ * can be determined by the part of the keys array the prop is defined in, and
14
+ * the way that element is defined: if the array contains a singular literal
15
+ * key in either the required prefix or the suffix, we know that prop should be
16
+ * picked as-is, otherwise, the key might not be present in the keys array so it
17
+ * can only be picked optionally.
18
+ */
19
+ type PickBoundedFromArray<T, Keys extends ReadonlyArray<KeysOfUnion<T>>> = Pick<T, Extract<ItemsByUnion<TupleParts<Keys>['required']>['singular'] | ItemsByUnion<TupleParts<Keys>['suffix']>['singular'], keyof T>> & Partial<Pick<T, Extract<ItemsByUnion<TupleParts<Keys>['required']>['union'] | TupleParts<Keys>['optional'][number] | TupleParts<Keys>['item'] | ItemsByUnion<TupleParts<Keys>['suffix']>['union'], keyof T>>>;
20
+ /**
21
+ * We split the fixed tuple item types into **singular** props (e.g., `"a"`),
22
+ * and unions of several props (e.g., `"a" | "b"`).
23
+ *
24
+ * We assume that T is a fixed tuple (no optional or rest elements), and that
25
+ * all elements in it are bounded (as defined by `IsBounded`).
26
+ */
27
+ type ItemsByUnion<T, Singular = never, Union = never> = T extends readonly [
28
+ infer Head,
29
+ ...infer Rest
30
+ ] ? If<IsUnion<Head>, ItemsByUnion<Rest, Singular, Union | Head>, ItemsByUnion<Rest, Singular | Head, Union>> : {
31
+ singular: Singular;
32
+ union: Union;
33
+ };
34
+ /**
35
+ * The built-in `Pick` is weird when it comes to picking bounded keys from
36
+ * unbounded records. It reconstructs the output object regardless of the shape
37
+ * of the input: `Pick<Record<string, "world">, "hello">` results in the type
38
+ * `{ hello: "world" }`, but you'd expect it to be optional because we don't
39
+ * know if the record contains a `hello` prop or not!
40
+ *
41
+ * !Important: We assume T is unbounded and don't test for it!
42
+ *
43
+ * See: https://www.typescriptlang.org/play/?#code/PTAEE0HsFcHIBNQFMAeAHJBjALqAGqNpKAEZKigAGA3qABZIA2jkA-AFygBEA7pAE6N4XUAF9KAGlLRcAQ0ayAzgChsATwz5QAXlAAFAJaYA1gB4ASlgHxTi7PwMA7AOZTeAoVwB8bhs0jeANzKIBSgAHqsykA.
44
+ */
45
+ type PickUnbounded<T, Keys extends keyof T> = If<IsBounded<Keys>, Partial<Pick<T, Keys>>, Pick<T, Keys>>;
1
46
  /**
2
- * Creates an object composed of the picked `object` properties.
47
+ * Creates an object composed of the picked `data` properties.
3
48
  *
4
- * @param names - The properties names.
49
+ * @param keys - The property names.
5
50
  * @signature P.pick([prop1, prop2])(object)
6
51
  * @example
7
52
  * P.pipe({ a: 1, b: 2, c: 3, d: 4 }, P.pick(['a', 'd'])) // => { a: 1, d: 4 }
8
53
  * @dataLast
9
54
  * @category Object
10
55
  */
11
- declare function pick<T extends object, K extends keyof T>(names: ReadonlyArray<K>): (object: T) => Pick<T, K>;
56
+ declare function pick<T extends object, const Keys extends ReadonlyArray<KeysOfUnion<T>>>(keys: Keys): (data: T) => PickFromArray<T, Keys>;
12
57
  /**
13
- * Creates an object composed of the picked `object` properties.
58
+ * Creates an object composed of the picked `data` properties.
14
59
  *
15
- * @param object - The target object.
16
- * @param names - The properties names.
60
+ * @param data - The target object.
61
+ * @param keys - The property names.
17
62
  * @signature P.pick(object, [prop1, prop2])
18
63
  * @example
19
64
  * P.pick({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd']) // => { a: 1, d: 4 }
20
65
  * @dataFirst
21
66
  * @category Object
22
67
  */
23
- declare function pick<T extends object, K extends keyof T>(object: T, names: ReadonlyArray<K>): Pick<T, K>;
68
+ declare function pick<T extends object, const Keys extends ReadonlyArray<KeysOfUnion<T>>>(data: T, keys: Keys): PickFromArray<T, Keys>;
24
69
 
25
70
  export { pick };
package/dist/pick.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-6L5XEBJG.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as pick};
1
+ import{a}from"./chunk-Z7D7Q6U3.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as pick};
package/dist/pipe.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBO34ARLYcjs = require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');exports.pipe = _chunkBO34ARLYcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBO34ARLYcjs = require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');require('./chunk-MBGSSEZN.cjs');exports.pipe = _chunkBO34ARLYcjs.a;
package/dist/pipe.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";export{a as pipe};
1
+ import{a}from"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";import"./chunk-EK7ODJWE.js";export{a as pipe};
package/dist/piped.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2CBHJMXWcjs = require('./chunk-2CBHJMXW.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');exports.piped = _chunk2CBHJMXWcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2CBHJMXWcjs = require('./chunk-2CBHJMXW.cjs');require('./chunk-BO34ARLY.cjs');require('./chunk-N5JE6642.cjs');require('./chunk-MBGSSEZN.cjs');exports.piped = _chunk2CBHJMXWcjs.a;
package/dist/piped.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-N2NQKHB3.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";export{a as piped};
1
+ import{a}from"./chunk-N2NQKHB3.js";import"./chunk-QHBVEZSR.js";import"./chunk-EPU4K3DD.js";import"./chunk-EK7ODJWE.js";export{a as piped};
package/dist/product.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXY7YER5Ncjs = require('./chunk-XY7YER5N.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.product = _chunkXY7YER5Ncjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXY7YER5Ncjs = require('./chunk-XY7YER5N.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.product = _chunkXY7YER5Ncjs.a;
package/dist/product.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-5T6DY3SA.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as product};
1
+ import{a}from"./chunk-5T6DY3SA.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as product};
package/dist/prop.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSOPOELNUcjs = require('./chunk-SOPOELNU.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.prop = _chunkSOPOELNUcjs.a; exports.propImplementation = _chunkSOPOELNUcjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSOPOELNUcjs = require('./chunk-SOPOELNU.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.prop = _chunkSOPOELNUcjs.a; exports.propImplementation = _chunkSOPOELNUcjs.b;
package/dist/prop.js CHANGED
@@ -1 +1 @@
1
- import{a,b}from"./chunk-NEIICTWC.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as prop,b as propImplementation};
1
+ import{a,b}from"./chunk-NEIICTWC.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as prop,b as propImplementation};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFGMSPUSFcjs = require('./chunk-FGMSPUSF.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.pullObject = _chunkFGMSPUSFcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFGMSPUSFcjs = require('./chunk-FGMSPUSF.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.pullObject = _chunkFGMSPUSFcjs.a;
@@ -1,7 +1,8 @@
1
- import { B as BoundedPartial } from './bounded-partial-wqR8ceNQ.cjs';
1
+ import { B as BoundedPartial } from './bounded-partial-BqwRN49U.cjs';
2
2
  import { I as IterableContainer } from './iterable-container-BTpDVdNc.cjs';
3
- import './if-bounded-record-Drd4UbBU.cjs';
3
+ import './if-D4QIikQ1.cjs';
4
4
  import 'type-fest';
5
+ import './is-bounded-record-C9WAwfA8.cjs';
5
6
 
6
7
  /**
7
8
  * Creates an object that maps the result of `valueExtractor` with a key
@@ -1,7 +1,8 @@
1
- import { B as BoundedPartial } from './bounded-partial-CJjczH6j.js';
1
+ import { B as BoundedPartial } from './bounded-partial-BzynYDVs.js';
2
2
  import { I as IterableContainer } from './iterable-container-BTpDVdNc.js';
3
- import './if-bounded-record-Drd4UbBU.js';
3
+ import './if-D4QIikQ1.js';
4
4
  import 'type-fest';
5
+ import './is-bounded-record-C9WAwfA8.js';
5
6
 
6
7
  /**
7
8
  * Creates an object that maps the result of `valueExtractor` with a key
@@ -1 +1 @@
1
- import{a}from"./chunk-B6SBIS6W.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as pullObject};
1
+ import{a}from"./chunk-B6SBIS6W.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as pullObject};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSJMGQLYScjs = require('./chunk-SJMGQLYS.cjs');exports.randomInteger = _chunkSJMGQLYScjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSJMGQLYScjs = require('./chunk-SJMGQLYS.cjs');require('./chunk-MBGSSEZN.cjs');exports.randomInteger = _chunkSJMGQLYScjs.a;
@@ -1 +1 @@
1
- import{a}from"./chunk-I2Z6A55T.js";export{a as randomInteger};
1
+ import{a}from"./chunk-I2Z6A55T.js";import"./chunk-EK7ODJWE.js";export{a as randomInteger};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk63GGX2BScjs = require('./chunk-63GGX2BS.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.randomString = _chunk63GGX2BScjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk63GGX2BScjs = require('./chunk-63GGX2BS.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.randomString = _chunk63GGX2BScjs.a;
@@ -1 +1 @@
1
- import{a}from"./chunk-U6ZJSHFS.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as randomString};
1
+ import{a}from"./chunk-U6ZJSHFS.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as randomString};
package/dist/range.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAPO7U7HGcjs = require('./chunk-APO7U7HG.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.range = _chunkAPO7U7HGcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAPO7U7HGcjs = require('./chunk-APO7U7HG.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.range = _chunkAPO7U7HGcjs.a;
package/dist/range.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-XWQ3IM2J.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as range};
1
+ import{a}from"./chunk-XWQ3IM2J.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as range};
package/dist/rank-by.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZLNSRDW7cjs = require('./chunk-ZLNSRDW7.cjs');require('./chunk-EROXO3T4.cjs');exports.rankBy = _chunkZLNSRDW7cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZLNSRDW7cjs = require('./chunk-ZLNSRDW7.cjs');require('./chunk-EROXO3T4.cjs');require('./chunk-MBGSSEZN.cjs');exports.rankBy = _chunkZLNSRDW7cjs.a;
@@ -1,5 +1,5 @@
1
- import { N as NonEmptyArray } from './non-empty-array-C9Od1wmF.cjs';
2
1
  import { O as OrderRule } from './curry-order-rules-BKXCPBNx.cjs';
2
+ import { N as NonEmptyArray } from './non-empty-array-C9Od1wmF.cjs';
3
3
 
4
4
  /**
5
5
  * Calculates the rank of an item in an array based on `rules`. The rank is the position where the item would appear in the sorted array. This function provides an efficient way to determine the rank in *O(n)* time, compared to *O(nlogn)* for the equivalent `sortedIndex(sortBy(data, ...rules), item)`.
package/dist/rank-by.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { N as NonEmptyArray } from './non-empty-array-C9Od1wmF.js';
2
1
  import { O as OrderRule } from './curry-order-rules-BKXCPBNx.js';
2
+ import { N as NonEmptyArray } from './non-empty-array-C9Od1wmF.js';
3
3
 
4
4
  /**
5
5
  * Calculates the rank of an item in an array based on `rules`. The rank is the position where the item would appear in the sorted array. This function provides an efficient way to determine the rank in *O(n)* time, compared to *O(nlogn)* for the equivalent `sortedIndex(sortBy(data, ...rules), item)`.
package/dist/rank-by.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-G57ZPKMR.js";import"./chunk-7KBK2RWQ.js";export{a as rankBy};
1
+ import{a}from"./chunk-G57ZPKMR.js";import"./chunk-7KBK2RWQ.js";import"./chunk-EK7ODJWE.js";export{a as rankBy};
package/dist/reduce.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkH6WDSTL3cjs = require('./chunk-H6WDSTL3.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.reduce = _chunkH6WDSTL3cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkH6WDSTL3cjs = require('./chunk-H6WDSTL3.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.reduce = _chunkH6WDSTL3cjs.a;
package/dist/reduce.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-IZWZPKOA.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as reduce};
1
+ import{a}from"./chunk-IZWZPKOA.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as reduce};
package/dist/reverse.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVAU7HZPOcjs = require('./chunk-VAU7HZPO.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.reverse = _chunkVAU7HZPOcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVAU7HZPOcjs = require('./chunk-VAU7HZPO.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.reverse = _chunkVAU7HZPOcjs.a;
package/dist/reverse.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-JNQXGRDN.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as reverse};
1
+ import{a}from"./chunk-JNQXGRDN.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as reverse};
package/dist/round.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIRWDTBZTcjs = require('./chunk-IRWDTBZT.cjs');require('./chunk-M22GUUVY.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.round = _chunkIRWDTBZTcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIRWDTBZTcjs = require('./chunk-IRWDTBZT.cjs');require('./chunk-M22GUUVY.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.round = _chunkIRWDTBZTcjs.a;
package/dist/round.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-P4HDHWKF.js";import"./chunk-PEJ74NWA.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as round};
1
+ import{a}from"./chunk-P4HDHWKF.js";import"./chunk-PEJ74NWA.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as round};
package/dist/sample.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2MHE6M7Vcjs = require('./chunk-2MHE6M7V.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.sample = _chunk2MHE6M7Vcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2MHE6M7Vcjs = require('./chunk-2MHE6M7V.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.sample = _chunk2MHE6M7Vcjs.a;
package/dist/sample.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-XEAAXO7F.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";export{a as sample};
1
+ import{a}from"./chunk-XEAAXO7F.js";import"./chunk-J6WPJH72.js";import"./chunk-KGPDVVVV.js";import"./chunk-EK7ODJWE.js";export{a as sample};
package/dist/set-path.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNQGMUM3Ecjs = require('./chunk-NQGMUM3E.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');exports.setPath = _chunkNQGMUM3Ecjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSG2YWG6Ucjs = require('./chunk-SG2YWG6U.cjs');require('./chunk-XR72I63W.cjs');require('./chunk-GZJMERDJ.cjs');require('./chunk-MBGSSEZN.cjs');exports.setPath = _chunkSG2YWG6Ucjs.a;
@@ -1,8 +1,19 @@
1
- type Path<T, Prefix extends ReadonlyArray<unknown> = []> = T extends ReadonlyArray<unknown> ? Path<T[number], [...Prefix, number]> | Prefix : T extends Record<PropertyKey, unknown> ? PathsOfObject<T, Prefix> | Prefix : Prefix;
2
- type PathsOfObject<T, Prefix extends ReadonlyArray<unknown>> = {
3
- [K in keyof T]-?: Path<T[K], readonly [...Prefix, K]>;
4
- }[keyof T];
5
- type ValueAtPath<T, TPath> = TPath extends readonly [
1
+ import { ValueOf } from 'type-fest';
2
+ import { P as PerkakasTypeError } from './perkakas-type-error-8wPb8T2y.cjs';
3
+
4
+ type Paths<T, Prefix extends ReadonlyArray<unknown> = []> = Prefix | (T extends object ? ValueOf<{
5
+ [K in ProperKeyOf<T>]-?: Paths<T[K], [...Prefix, K]>;
6
+ }> : PerkakasTypeError<'setPath', 'Can only compute paths objects', {
7
+ type: never;
8
+ metadata: T;
9
+ }>) extends infer Path ? Readonly<Path> : never;
10
+ /**
11
+ * Array objects have all Array.prototype keys in their "keyof" type, which
12
+ * is not what we'd expect from the operator. We only want the numeric keys
13
+ * which represent proper elements of the array.
14
+ */
15
+ type ProperKeyOf<T> = Extract<keyof T, T extends ReadonlyArray<unknown> ? number : keyof T>;
16
+ type ValueAtPath<T, Path> = Path extends readonly [
6
17
  infer Head extends keyof T,
7
18
  ...infer Rest
8
19
  ] ? ValueAtPath<T[Head], Rest> : T;
@@ -21,7 +32,7 @@ type ValueAtPath<T, TPath> = TPath extends readonly [
21
32
  * @dataFirst
22
33
  * @category Object
23
34
  */
24
- declare function setPath<T, TPath extends Path<T>>(data: T, path: TPath, value: ValueAtPath<T, TPath>): T;
35
+ declare function setPath<T, Path extends Paths<T>>(data: T, path: Path, value: ValueAtPath<T, Path>): T;
25
36
  /**
26
37
  * Sets the value at `path` of `object`.
27
38
  *
@@ -34,6 +45,6 @@ declare function setPath<T, TPath extends Path<T>>(data: T, path: TPath, value:
34
45
  * @dataLast
35
46
  * @category Object
36
47
  */
37
- declare function setPath<T, TPath extends Path<T>, Value extends ValueAtPath<T, TPath>>(path: TPath, value: Value): (data: T) => T;
48
+ declare function setPath<T, Path extends Paths<T>, Value extends ValueAtPath<T, Path>>(path: Path, value: Value): (data: T) => T;
38
49
 
39
50
  export { setPath };