@vinicunca/perkakas 1.0.4 → 1.0.6

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 (341) hide show
  1. package/dist/add-prop.d.cts +1 -1
  2. package/dist/add-prop.d.ts +1 -1
  3. package/dist/{chunk-LG37S75J.js → chunk-23TPDBES.js} +1 -1
  4. package/dist/chunk-46GBCFAG.js +1 -0
  5. package/dist/chunk-5SEDUH3U.cjs +1 -0
  6. package/dist/{chunk-A62OZTSJ.js → chunk-6B6SBF6V.js} +1 -1
  7. package/dist/chunk-AFO7BV2X.js +1 -0
  8. package/dist/chunk-AQRYBCA3.cjs +1 -0
  9. package/dist/{chunk-7IYJC2PM.cjs → chunk-C6NFG7IS.cjs} +1 -1
  10. package/dist/chunk-CRWFVSUP.cjs +1 -0
  11. package/dist/{chunk-U32YSACL.cjs → chunk-CT4EPN4Q.cjs} +1 -1
  12. package/dist/{chunk-A6WT2DZU.cjs → chunk-D774SJZI.cjs} +1 -1
  13. package/dist/chunk-DQ5MWM7I.cjs +1 -0
  14. package/dist/{chunk-BF6VQFQK.js → chunk-FFGIG2SO.js} +1 -1
  15. package/dist/{chunk-6ALZHU2N.js → chunk-FOP5KNRT.js} +1 -1
  16. package/dist/chunk-G5M5BNF3.cjs +1 -0
  17. package/dist/{chunk-PKGL5JK6.js → chunk-HBSV33EM.js} +1 -1
  18. package/dist/chunk-HXYRD63B.cjs +1 -0
  19. package/dist/chunk-IOSBDH5J.cjs +1 -0
  20. package/dist/{chunk-IZZFU26S.cjs → chunk-K43ZLBUS.cjs} +1 -1
  21. package/dist/{chunk-Z5UEQBZP.cjs → chunk-LBLAWGUH.cjs} +1 -1
  22. package/dist/chunk-LCHZ57HW.js +1 -0
  23. package/dist/chunk-LWCPA2K5.cjs +1 -0
  24. package/dist/chunk-MUD45PL6.js +1 -0
  25. package/dist/chunk-NWEPH7CD.cjs +1 -0
  26. package/dist/chunk-QIZDLB7Z.js +1 -0
  27. package/dist/chunk-QT66COHU.js +1 -0
  28. package/dist/chunk-RJ4SY2RW.js +1 -0
  29. package/dist/chunk-S4XCRT2B.cjs +1 -0
  30. package/dist/{chunk-BGPRJNRQ.js → chunk-SOCUEKNU.js} +1 -1
  31. package/dist/{chunk-C6L5NLLB.js → chunk-SS3ILCPB.js} +1 -1
  32. package/dist/{chunk-NLX7PGPI.cjs → chunk-SU7H3HVP.cjs} +1 -1
  33. package/dist/{chunk-3X6SAJDQ.cjs → chunk-SW6GJ7UA.cjs} +1 -1
  34. package/dist/chunk-T4LCVT74.js +1 -0
  35. package/dist/chunk-TYOJTJP6.js +1 -0
  36. package/dist/chunk-VPLMRR25.cjs +1 -0
  37. package/dist/{chunk-EPHUNAE5.js → chunk-WDT4BJAH.js} +1 -1
  38. package/dist/{chunk-MLLA7SGZ.cjs → chunk-WYRK6YJU.cjs} +1 -1
  39. package/dist/chunk-XYMW4QIS.js +1 -0
  40. package/dist/chunk-Y5OLUMVB.js +1 -0
  41. package/dist/{chunk-LSXNPOLD.js → chunk-Y7ACNJIO.js} +1 -1
  42. package/dist/{chunk-I6VXEY44.cjs → chunk-Y7L64OLN.cjs} +1 -1
  43. package/dist/chunk.d.cts +1 -1
  44. package/dist/chunk.d.ts +1 -1
  45. package/dist/concat.d.cts +1 -1
  46. package/dist/concat.d.ts +1 -1
  47. package/dist/conditional.d.cts +1 -1
  48. package/dist/conditional.d.ts +1 -1
  49. package/dist/conditional.spec-d.cjs +1 -1
  50. package/dist/conditional.spec-d.js +1 -1
  51. package/dist/debounce.spec-d.cjs +1 -1
  52. package/dist/debounce.spec-d.js +1 -1
  53. package/dist/difference-with.cjs +1 -1
  54. package/dist/difference-with.js +1 -1
  55. package/dist/difference.cjs +1 -1
  56. package/dist/difference.js +1 -1
  57. package/dist/do-nothing.cjs +1 -1
  58. package/dist/do-nothing.d.cts +1 -1
  59. package/dist/do-nothing.d.ts +1 -1
  60. package/dist/do-nothing.js +1 -1
  61. package/dist/do-nothing.spec-d.cjs +1 -1
  62. package/dist/do-nothing.spec-d.js +1 -1
  63. package/dist/drop-first-by.d.cts +1 -1
  64. package/dist/drop-first-by.d.ts +1 -1
  65. package/dist/drop-last-while.d.cts +1 -1
  66. package/dist/drop-last-while.d.ts +1 -1
  67. package/dist/drop-last-while.spec-d.cjs +1 -1
  68. package/dist/drop-last-while.spec-d.js +1 -1
  69. package/dist/drop-last.d.cts +1 -1
  70. package/dist/drop-last.d.ts +1 -1
  71. package/dist/drop-last.spec-d.cjs +1 -1
  72. package/dist/drop-last.spec-d.js +1 -1
  73. package/dist/drop-while.d.cts +1 -1
  74. package/dist/drop-while.d.ts +1 -1
  75. package/dist/drop-while.spec-d.cjs +1 -1
  76. package/dist/drop-while.spec-d.js +1 -1
  77. package/dist/drop.cjs +1 -1
  78. package/dist/drop.d.cts +20 -7
  79. package/dist/drop.d.ts +20 -7
  80. package/dist/drop.js +1 -1
  81. package/dist/drop.spec-d.cjs +1 -1
  82. package/dist/drop.spec-d.js +1 -1
  83. package/dist/evolve.d.cts +1 -1
  84. package/dist/evolve.d.ts +1 -1
  85. package/dist/evolve.spec-d.cjs +1 -1
  86. package/dist/evolve.spec-d.js +1 -1
  87. package/dist/filter.cjs +1 -1
  88. package/dist/filter.js +1 -1
  89. package/dist/filter.spec-d.cjs +1 -1
  90. package/dist/filter.spec-d.js +1 -1
  91. package/dist/find.cjs +1 -1
  92. package/dist/find.js +1 -1
  93. package/dist/find.spec-d.cjs +1 -1
  94. package/dist/find.spec-d.js +1 -1
  95. package/dist/first-by.d.cts +1 -1
  96. package/dist/first-by.d.ts +1 -1
  97. package/dist/first-by.spec-d.cjs +1 -1
  98. package/dist/first-by.spec-d.js +1 -1
  99. package/dist/first.d.cts +1 -1
  100. package/dist/first.d.ts +1 -1
  101. package/dist/flat.cjs +1 -1
  102. package/dist/flat.d.cts +1 -1
  103. package/dist/flat.d.ts +1 -1
  104. package/dist/flat.js +1 -1
  105. package/dist/flat.spec-d.cjs +1 -1
  106. package/dist/flat.spec-d.js +1 -1
  107. package/dist/for-each-obj.d.cts +1 -1
  108. package/dist/for-each-obj.d.ts +1 -1
  109. package/dist/for-each-obj.spec-d.cjs +1 -1
  110. package/dist/for-each-obj.spec-d.js +1 -1
  111. package/dist/for-each.d.cts +1 -1
  112. package/dist/for-each.d.ts +1 -1
  113. package/dist/for-each.spec-d.cjs +1 -1
  114. package/dist/for-each.spec-d.js +1 -1
  115. package/dist/from-entries.d.cts +1 -1
  116. package/dist/from-entries.d.ts +1 -1
  117. package/dist/from-keys.d.cts +1 -1
  118. package/dist/from-keys.d.ts +1 -1
  119. package/dist/from-keys.spec-d.cjs +1 -1
  120. package/dist/from-keys.spec-d.js +1 -1
  121. package/dist/group-by.d.cts +1 -1
  122. package/dist/group-by.d.ts +1 -1
  123. package/dist/has-at-least.d.cts +1 -1
  124. package/dist/has-at-least.d.ts +1 -1
  125. package/dist/has-sub-object.d.cts +1 -1
  126. package/dist/has-sub-object.d.ts +1 -1
  127. package/dist/has-sub-object.spec-d.cjs +1 -1
  128. package/dist/has-sub-object.spec-d.js +1 -1
  129. package/dist/human-readable-file-size.d.cts +1 -0
  130. package/dist/human-readable-file-size.d.ts +1 -0
  131. package/dist/identity.cjs +1 -1
  132. package/dist/identity.d.cts +1 -1
  133. package/dist/identity.d.ts +1 -1
  134. package/dist/identity.js +1 -1
  135. package/dist/identity.spec-d.cjs +1 -1
  136. package/dist/identity.spec-d.js +1 -1
  137. package/dist/index-by.d.cts +1 -1
  138. package/dist/index-by.d.ts +1 -1
  139. package/dist/index-by.spec-d.cjs +1 -1
  140. package/dist/index-by.spec-d.js +1 -1
  141. package/dist/index.cjs +1 -1
  142. package/dist/index.d.cts +2 -1
  143. package/dist/index.d.ts +2 -1
  144. package/dist/index.js +1 -1
  145. package/dist/intersection-with.cjs +1 -1
  146. package/dist/intersection-with.js +1 -1
  147. package/dist/intersection.cjs +1 -1
  148. package/dist/intersection.js +1 -1
  149. package/dist/intersection.spec-d.cjs +1 -1
  150. package/dist/intersection.spec-d.js +1 -1
  151. package/dist/is-array.d.cts +1 -1
  152. package/dist/is-array.d.ts +1 -1
  153. package/dist/is-big-int.d.cts +1 -1
  154. package/dist/is-big-int.d.ts +1 -1
  155. package/dist/is-boolean.d.cts +1 -1
  156. package/dist/is-boolean.d.ts +1 -1
  157. package/dist/is-deep-equal.spec-d.cjs +1 -1
  158. package/dist/is-deep-equal.spec-d.js +1 -1
  159. package/dist/is-empty.d.cts +1 -1
  160. package/dist/is-empty.d.ts +1 -1
  161. package/dist/is-included-in.d.cts +1 -1
  162. package/dist/is-included-in.d.ts +1 -1
  163. package/dist/is-nullish.d.cts +1 -1
  164. package/dist/is-nullish.d.ts +1 -1
  165. package/dist/is-number.d.cts +1 -1
  166. package/dist/is-number.d.ts +1 -1
  167. package/dist/is-object-type.d.cts +1 -1
  168. package/dist/is-object-type.d.ts +1 -1
  169. package/dist/is-plain-object.d.cts +1 -1
  170. package/dist/is-plain-object.d.ts +1 -1
  171. package/dist/is-shallow-equal.spec-d.cjs +1 -1
  172. package/dist/is-shallow-equal.spec-d.js +1 -1
  173. package/dist/is-strict-equal.spec-d.cjs +1 -1
  174. package/dist/is-strict-equal.spec-d.js +1 -1
  175. package/dist/is-string.d.cts +1 -1
  176. package/dist/is-string.d.ts +1 -1
  177. package/dist/is-symbol.d.cts +1 -1
  178. package/dist/is-symbol.d.ts +1 -1
  179. package/dist/keys.d.cts +1 -1
  180. package/dist/keys.d.ts +1 -1
  181. package/dist/keys.spec-d.cjs +1 -1
  182. package/dist/keys.spec-d.js +1 -1
  183. package/dist/last.d.cts +1 -1
  184. package/dist/last.d.ts +1 -1
  185. package/dist/last.spec-d.cjs +1 -1
  186. package/dist/last.spec-d.js +1 -1
  187. package/dist/map-keys.d.cts +1 -1
  188. package/dist/map-keys.d.ts +1 -1
  189. package/dist/map-keys.spec-d.cjs +1 -1
  190. package/dist/map-keys.spec-d.js +1 -1
  191. package/dist/map-values.d.cts +1 -1
  192. package/dist/map-values.d.ts +1 -1
  193. package/dist/map-values.spec-d.cjs +1 -1
  194. package/dist/map-values.spec-d.js +1 -1
  195. package/dist/map-with-feedback.cjs +1 -1
  196. package/dist/map-with-feedback.d.cts +1 -1
  197. package/dist/map-with-feedback.d.ts +1 -1
  198. package/dist/map-with-feedback.js +1 -1
  199. package/dist/map-with-feedback.spec-d.cjs +1 -1
  200. package/dist/map-with-feedback.spec-d.js +1 -1
  201. package/dist/map.d.cts +1 -1
  202. package/dist/map.d.ts +1 -1
  203. package/dist/nth-by.d.cts +1 -1
  204. package/dist/nth-by.d.ts +1 -1
  205. package/dist/nth-by.spec-d.cjs +1 -1
  206. package/dist/nth-by.spec-d.js +1 -1
  207. package/dist/omit-by.d.cts +1 -1
  208. package/dist/omit-by.d.ts +1 -1
  209. package/dist/omit-by.spec-d.cjs +1 -1
  210. package/dist/omit-by.spec-d.js +1 -1
  211. package/dist/omit.spec-d.cjs +1 -1
  212. package/dist/omit.spec-d.js +1 -1
  213. package/dist/only.d.cts +1 -1
  214. package/dist/only.d.ts +1 -1
  215. package/dist/partition.spec-d.cjs +1 -1
  216. package/dist/partition.spec-d.js +1 -1
  217. package/dist/pick-by.d.cts +1 -1
  218. package/dist/pick-by.d.ts +1 -1
  219. package/dist/pick-by.spec-d.cjs +1 -1
  220. package/dist/pick-by.spec-d.js +1 -1
  221. package/dist/pick.spec-d.cjs +1 -1
  222. package/dist/pick.spec-d.js +1 -1
  223. package/dist/pipe.cjs +1 -1
  224. package/dist/pipe.js +1 -1
  225. package/dist/piped.cjs +1 -1
  226. package/dist/piped.js +1 -1
  227. package/dist/product.d.cts +1 -1
  228. package/dist/product.d.ts +1 -1
  229. package/dist/product.spec-d.cjs +1 -1
  230. package/dist/product.spec-d.js +1 -1
  231. package/dist/prop.spec-d.cjs +1 -1
  232. package/dist/prop.spec-d.js +1 -1
  233. package/dist/pull-object.d.cts +1 -1
  234. package/dist/pull-object.d.ts +1 -1
  235. package/dist/pull-object.spec-d.cjs +1 -1
  236. package/dist/pull-object.spec-d.js +1 -1
  237. package/dist/random-integer.cjs +1 -0
  238. package/dist/random-integer.d.cts +20 -0
  239. package/dist/random-integer.d.ts +20 -0
  240. package/dist/random-integer.js +1 -0
  241. package/dist/random-integer.spec-d.cjs +1 -0
  242. package/dist/random-integer.spec-d.d.cts +2 -0
  243. package/dist/random-integer.spec-d.d.ts +2 -0
  244. package/dist/random-integer.spec-d.js +1 -0
  245. package/dist/rank-by.d.cts +1 -1
  246. package/dist/rank-by.d.ts +1 -1
  247. package/dist/reverse.spec-d.cjs +1 -1
  248. package/dist/reverse.spec-d.js +1 -1
  249. package/dist/sample.d.cts +1 -1
  250. package/dist/sample.d.ts +1 -1
  251. package/dist/set-path.spec-d.cjs +1 -1
  252. package/dist/set-path.spec-d.js +1 -1
  253. package/dist/set.d.cts +1 -1
  254. package/dist/set.d.ts +1 -1
  255. package/dist/shuffle.d.cts +1 -1
  256. package/dist/shuffle.d.ts +1 -1
  257. package/dist/shuffle.spec-d.cjs +1 -1
  258. package/dist/shuffle.spec-d.js +1 -1
  259. package/dist/sort-by.d.cts +1 -1
  260. package/dist/sort-by.d.ts +1 -1
  261. package/dist/sort-by.spec-d.cjs +1 -1
  262. package/dist/sort-by.spec-d.js +1 -1
  263. package/dist/sort.d.cts +1 -1
  264. package/dist/sort.d.ts +1 -1
  265. package/dist/sum.d.cts +1 -1
  266. package/dist/sum.d.ts +1 -1
  267. package/dist/sum.spec-d.cjs +1 -1
  268. package/dist/sum.spec-d.js +1 -1
  269. package/dist/swap-indices.d.cts +1 -1
  270. package/dist/swap-indices.d.ts +1 -1
  271. package/dist/take-first-by.d.cts +1 -1
  272. package/dist/take-first-by.d.ts +1 -1
  273. package/dist/take-last-while.d.cts +1 -1
  274. package/dist/take-last-while.d.ts +1 -1
  275. package/dist/take-last-while.spec-d-.cjs +1 -1
  276. package/dist/take-last-while.spec-d-.js +1 -1
  277. package/dist/take-last.d.cts +1 -1
  278. package/dist/take-last.d.ts +1 -1
  279. package/dist/take-last.spec-d.cjs +1 -1
  280. package/dist/take-last.spec-d.js +1 -1
  281. package/dist/take-while.d.cts +1 -1
  282. package/dist/take-while.d.ts +1 -1
  283. package/dist/take-white.spec-d.cjs +1 -1
  284. package/dist/take-white.spec-d.js +1 -1
  285. package/dist/take.cjs +1 -1
  286. package/dist/take.d.cts +1 -1
  287. package/dist/take.d.ts +1 -1
  288. package/dist/take.js +1 -1
  289. package/dist/take.spec-d.cjs +1 -1
  290. package/dist/take.spec-d.js +1 -1
  291. package/dist/tap.spec-d.cjs +1 -1
  292. package/dist/tap.spec-d.js +1 -1
  293. package/dist/times.spec-d.cjs +1 -1
  294. package/dist/times.spec-d.js +1 -1
  295. package/dist/{types-BE3YOWVA.d.cts → types-CC8iZVKO.d.cts} +12 -2
  296. package/dist/{types-BE3YOWVA.d.ts → types-CC8iZVKO.d.ts} +12 -2
  297. package/dist/unique-by.cjs +1 -1
  298. package/dist/unique-by.d.cts +1 -1
  299. package/dist/unique-by.d.ts +1 -1
  300. package/dist/unique-by.js +1 -1
  301. package/dist/unique-with.cjs +1 -1
  302. package/dist/unique-with.d.cts +1 -1
  303. package/dist/unique-with.d.ts +1 -1
  304. package/dist/unique-with.js +1 -1
  305. package/dist/unique.cjs +1 -1
  306. package/dist/unique.d.cts +1 -1
  307. package/dist/unique.d.ts +1 -1
  308. package/dist/unique.js +1 -1
  309. package/dist/values.d.cts +1 -1
  310. package/dist/values.d.ts +1 -1
  311. package/dist/values.spec-d.cjs +1 -1
  312. package/dist/values.spec-d.js +1 -1
  313. package/dist/zip-with.d.cts +1 -1
  314. package/dist/zip-with.d.ts +1 -1
  315. package/dist/zip-with.spec-d.cjs +1 -1
  316. package/dist/zip-with.spec-d.js +1 -1
  317. package/dist/zip.d.cts +1 -1
  318. package/dist/zip.d.ts +1 -1
  319. package/dist/zip.spec-d.cjs +1 -1
  320. package/dist/zip.spec-d.js +1 -1
  321. package/package.json +14 -13
  322. package/dist/chunk-A535Z4LW.cjs +0 -1
  323. package/dist/chunk-AKGWT6GC.js +0 -1
  324. package/dist/chunk-BRLENORL.js +0 -1
  325. package/dist/chunk-E6RBEL5Z.cjs +0 -1
  326. package/dist/chunk-EKYCE7XE.cjs +0 -1
  327. package/dist/chunk-FNZCH7TN.cjs +0 -1
  328. package/dist/chunk-GNPFJJSC.cjs +0 -1
  329. package/dist/chunk-HTO3K3VA.cjs +0 -1
  330. package/dist/chunk-IRH6TGG5.js +0 -1
  331. package/dist/chunk-JLRJ44YR.js +0 -1
  332. package/dist/chunk-KITVKWLP.cjs +0 -1
  333. package/dist/chunk-MADDQNAR.cjs +0 -1
  334. package/dist/chunk-MYLYERXO.js +0 -1
  335. package/dist/chunk-NULDWRPD.cjs +0 -1
  336. package/dist/chunk-PHKKU45J.js +0 -1
  337. package/dist/chunk-RCENCAXY.cjs +0 -1
  338. package/dist/chunk-UNKQWZT6.js +0 -1
  339. package/dist/chunk-WQDEYM64.js +0 -1
  340. package/dist/chunk-WRKGH4XX.js +0 -1
  341. package/dist/chunk-WUAU3LTQ.js +0 -1
package/dist/drop.d.cts CHANGED
@@ -1,11 +1,24 @@
1
- import { IfNever } from 'type-fest';
2
- import { I as IterableContainer, T as TupleParts, N as NTuple } from './types-BE3YOWVA.cjs';
1
+ import { IsNegative, IsInteger, Subtract } from 'type-fest';
2
+ import { I as IterableContainer, T as TupleParts, N as NTuple, C as CoercedArray } from './types-CC8iZVKO.cjs';
3
3
 
4
- type Drop<T extends IterableContainer, N extends number> = number extends N ? Array<T[number]> : `${N}` extends `-${number}` ? T : [
5
- ...(TupleParts<T>['prefix'] extends [...NTuple<unknown, N>, ...infer V] ? V : []),
6
- ...IfNever<TupleParts<T>['item'], [
7
- ], Array<TupleParts<T>['item'] | TupleParts<T>['suffix'][number]>>
8
- ];
4
+ type Drop<T extends IterableContainer, N extends number> = IsNegative<N> extends true ? T : IsInteger<N> extends false ? Array<T[number]> : TupleParts<T>['prefix'] extends [
5
+ ...NTuple<unknown, N>,
6
+ ...infer Remaining
7
+ ] ? [
8
+ ...Remaining,
9
+ ...CoercedArray<TupleParts<T>['item']>,
10
+ ...TupleParts<T>['suffix']
11
+ ] : 0 extends TupleParts<T>['suffix']['length'] ? CoercedArray<TupleParts<T>['item']> : [...Array<TupleParts<T>['item']>, ...TupleParts<T>['suffix']] | DropUpTo<TupleParts<T>['suffix'], Subtract<N, TupleParts<T>['prefix']['length']>>;
12
+ /**
13
+ * Arrays with a fixed suffix will result in any number of items being dropped,
14
+ * up to N, and not just N itself. This is because we don't know during typing
15
+ * how many items the "rest" part of the tuple will have in runtime.
16
+ *
17
+ * !Important: This is an internal type and assumes that T is a fixed-size
18
+ * tuple! It will not work if T has a rest element.
19
+ */
20
+ type DropUpTo<T, N, Dropped extends ReadonlyArray<unknown> = []> = Dropped['length'] extends N ? T : T extends [unknown, ...infer Rest] ? // Take the current value, and then recurse with the array where it is
21
+ DropUpTo<Rest, N, [...Dropped, unknown]> | T : T;
9
22
  /**
10
23
  * Removes first `n` elements from the `array`.
11
24
  *
package/dist/drop.d.ts CHANGED
@@ -1,11 +1,24 @@
1
- import { IfNever } from 'type-fest';
2
- import { I as IterableContainer, T as TupleParts, N as NTuple } from './types-BE3YOWVA.js';
1
+ import { IsNegative, IsInteger, Subtract } from 'type-fest';
2
+ import { I as IterableContainer, T as TupleParts, N as NTuple, C as CoercedArray } from './types-CC8iZVKO.js';
3
3
 
4
- type Drop<T extends IterableContainer, N extends number> = number extends N ? Array<T[number]> : `${N}` extends `-${number}` ? T : [
5
- ...(TupleParts<T>['prefix'] extends [...NTuple<unknown, N>, ...infer V] ? V : []),
6
- ...IfNever<TupleParts<T>['item'], [
7
- ], Array<TupleParts<T>['item'] | TupleParts<T>['suffix'][number]>>
8
- ];
4
+ type Drop<T extends IterableContainer, N extends number> = IsNegative<N> extends true ? T : IsInteger<N> extends false ? Array<T[number]> : TupleParts<T>['prefix'] extends [
5
+ ...NTuple<unknown, N>,
6
+ ...infer Remaining
7
+ ] ? [
8
+ ...Remaining,
9
+ ...CoercedArray<TupleParts<T>['item']>,
10
+ ...TupleParts<T>['suffix']
11
+ ] : 0 extends TupleParts<T>['suffix']['length'] ? CoercedArray<TupleParts<T>['item']> : [...Array<TupleParts<T>['item']>, ...TupleParts<T>['suffix']] | DropUpTo<TupleParts<T>['suffix'], Subtract<N, TupleParts<T>['prefix']['length']>>;
12
+ /**
13
+ * Arrays with a fixed suffix will result in any number of items being dropped,
14
+ * up to N, and not just N itself. This is because we don't know during typing
15
+ * how many items the "rest" part of the tuple will have in runtime.
16
+ *
17
+ * !Important: This is an internal type and assumes that T is a fixed-size
18
+ * tuple! It will not work if T has a rest element.
19
+ */
20
+ type DropUpTo<T, N, Dropped extends ReadonlyArray<unknown> = []> = Dropped['length'] extends N ? T : T extends [unknown, ...infer Rest] ? // Take the current value, and then recurse with the array where it is
21
+ DropUpTo<Rest, N, [...Dropped, unknown]> | T : T;
9
22
  /**
10
23
  * Removes first `n` elements from the `array`.
11
24
  *
package/dist/drop.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-IRH6TGG5.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as drop};
1
+ import{a}from"./chunk-XYMW4QIS.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as drop};
@@ -1 +1 @@
1
- "use strict";var _chunkRCENCAXYcjs = require('./chunk-RCENCAXY.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data-first",()=>{test("empty array",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [1],2);expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [1],2);expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [1,"a"],2);expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [1,"a",!0],2);expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [1],-1);expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=_chunkRCENCAXYcjs.a.call(void 0, [1],1);expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [1],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [1],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [1,"a"],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [1,"a",!0],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [],_chunkRCENCAXYcjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [],_chunkRCENCAXYcjs.a.call(void 0, -1));expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [],_chunkRCENCAXYcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()})});
1
+ "use strict";var _chunkG5M5BNF3cjs = require('./chunk-G5M5BNF3.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data-first",()=>{test("empty array",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("prefixed array",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1],2);expectTypeOf(e).toEqualTypeOf()}),test("suffixed array",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1],2);expectTypeOf(e).toEqualTypeOf()}),describe("arrays with a prefix (2) and a suffix (2)",()=>{test("N === 0 (no drop)",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,2,"a","b"],0);expectTypeOf(e).toEqualTypeOf()}),test("N === 1 (drop from the prefix)",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,2,"a","b"],1);expectTypeOf(e).toEqualTypeOf()}),test("N === 2 (remove the prefix)",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,2,"a","b"],2);expectTypeOf(e).toEqualTypeOf()}),test("N === 3 (drop the whole prefix, remove from the suffix)",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,2,"a","b"],3);expectTypeOf(e).toEqualTypeOf()}),test("N === 4 (drop the whole prefix, drop the whole suffix)",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,2,"a","b"],4);expectTypeOf(e).toEqualTypeOf()}),test("N > 4 (drop more than the constant parts of the array)",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,2,"a","b"],5);expectTypeOf(e).toEqualTypeOf()})}),test("tuple",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [1,"a",!0],2);expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [],2);expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, [],-1);expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=_chunkG5M5BNF3cjs.a.call(void 0, ["a",1,!0],1);expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [1,"a",!0],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkG5M5BNF3cjs.a.call(void 0, 2));expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkG5M5BNF3cjs.a.call(void 0, -1));expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, [],_chunkG5M5BNF3cjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()})});
@@ -1 +1 @@
1
- import{a as r}from"./chunk-IRH6TGG5.js";import{a as t}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data-first",()=>{test("empty array",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=r([1],2);expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=r([1],2);expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=r([1,"a"],2);expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=r([1,"a",!0],2);expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=r([1],-1);expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=r([1],1);expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=t([1],r(2));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=t([1],r(2));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=t([1,"a"],r(2));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=t([1,"a",!0],r(2));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=t([],r(-1));expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=t([],r(1));expectTypeOf(e).toEqualTypeOf()})});
1
+ import{a as r}from"./chunk-XYMW4QIS.js";import{a as t}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data-first",()=>{test("empty array",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("prefixed array",()=>{let e=r([1],2);expectTypeOf(e).toEqualTypeOf()}),test("suffixed array",()=>{let e=r([1],2);expectTypeOf(e).toEqualTypeOf()}),describe("arrays with a prefix (2) and a suffix (2)",()=>{test("N === 0 (no drop)",()=>{let e=r([1,2,"a","b"],0);expectTypeOf(e).toEqualTypeOf()}),test("N === 1 (drop from the prefix)",()=>{let e=r([1,2,"a","b"],1);expectTypeOf(e).toEqualTypeOf()}),test("N === 2 (remove the prefix)",()=>{let e=r([1,2,"a","b"],2);expectTypeOf(e).toEqualTypeOf()}),test("N === 3 (drop the whole prefix, remove from the suffix)",()=>{let e=r([1,2,"a","b"],3);expectTypeOf(e).toEqualTypeOf()}),test("N === 4 (drop the whole prefix, drop the whole suffix)",()=>{let e=r([1,2,"a","b"],4);expectTypeOf(e).toEqualTypeOf()}),test("N > 4 (drop more than the constant parts of the array)",()=>{let e=r([1,2,"a","b"],5);expectTypeOf(e).toEqualTypeOf()})}),test("tuple",()=>{let e=r([1,"a",!0],2);expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=r([],2);expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=r([],-1);expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=r(["a",1,!0],1);expectTypeOf(e).toEqualTypeOf()})});describe("data-last",()=>{test("empty array",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("regular array",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("regular array with union type",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("prefix array",()=>{let e=t([1],r(2));expectTypeOf(e).toEqualTypeOf()}),test("suffix array",()=>{let e=t([1],r(2));expectTypeOf(e).toEqualTypeOf()}),test("array with suffix and prefix",()=>{let e=t([1,"a"],r(2));expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=t([1,"a",!0],r(2));expectTypeOf(e).toEqualTypeOf()}),test("union of arrays",()=>{let e=t([],r(2));expectTypeOf(e).toEqualTypeOf()}),test("negative count",()=>{let e=t([],r(-1));expectTypeOf(e).toEqualTypeOf()}),test("generalized typed count",()=>{let e=t([],r(1));expectTypeOf(e).toEqualTypeOf()})});
package/dist/evolve.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as IterableContainer } from './types-BE3YOWVA.cjs';
1
+ import { I as IterableContainer } from './types-CC8iZVKO.cjs';
2
2
  import 'type-fest';
3
3
 
4
4
  /**
package/dist/evolve.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as IterableContainer } from './types-BE3YOWVA.js';
1
+ import { I as IterableContainer } from './types-CC8iZVKO.js';
2
2
  import 'type-fest';
3
3
 
4
4
  /**
@@ -1 +1 @@
1
- "use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunk7EJQW5L6cjs = require('./chunk-7EJQW5L6.cjs');var _chunkQVDYQ7ZEcjs = require('./chunk-QVDYQ7ZE.cjs');var _chunkINAPFYB2cjs = require('./chunk-INAPFYB2.cjs');var _chunkWW7P3TAUcjs = require('./chunk-WW7P3TAU.cjs');var _chunkQ4B5JNZScjs = require('./chunk-Q4B5JNZS.cjs');var _chunkMQ3SR4YOcjs = require('./chunk-MQ3SR4YO.cjs');var _chunkMLLA7SGZcjs = require('./chunk-MLLA7SGZ.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-G66EZBJS.cjs');var _chunkSRZSHSZDcjs = require('./chunk-SRZSHSZD.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');var c=_chunkQVDYQ7ZEcjs.a.call(void 0, (e,r)=>_chunkSRZSHSZDcjs.a.call(void 0, e,r),0);describe("data first",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{id:_chunkSRZSHSZDcjs.a.call(void 0, 1),quartile:c,time:{elapsed:_chunkSRZSHSZDcjs.a.call(void 0, 1),remaining:_chunkSRZSHSZDcjs.a.call(void 0, -1)}});expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {n:100},{n:_chunkSRZSHSZDcjs.a.call(void 0, 1)});expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {first:1,nested:{second:2,third:3}},{nested:{second:_chunkSRZSHSZDcjs.a.call(void 0, -1),third:_chunkSRZSHSZDcjs.a.call(void 0, 1)}});expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},{array:_chunkQ4B5JNZScjs.a.call(void 0, ),nestedObj:{a:r=>_chunk7EJQW5L6cjs.a.call(void 0, r,"b","Set")},objAry:r=>_chunkWW7P3TAUcjs.a.call(void 0, r,_chunkINAPFYB2cjs.a.call(void 0, ["b"]))});expectTypeOf(e).toEqualTypeOf()}),describe("type reflection",()=>{it("can reflect type of data to function of evolver object",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:r=>r});expectTypeOf(e).toEqualTypeOf()}),it("can reflect type of data to function of nested evolver object",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:{elapsed:r=>r,remaining:r=>r}});expectTypeOf(e).toEqualTypeOf()})}),it("can detect mismatch of parameters and arguments",()=>{_chunkMQ3SR4YOcjs.a.call(void 0, {number:"1",array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:"0",b:0},{a:1,b:1}]},{number:_chunkSRZSHSZDcjs.a.call(void 0, 1),array:e=>e.length,nestedObj:{a:_chunk7EJQW5L6cjs.a.call(void 0, "b",0)},objAry:_chunkWW7P3TAUcjs.a.call(void 0, _chunkINAPFYB2cjs.a.call(void 0, ["b"]))})}),it("does not accept function that require multiple arguments",()=>{_chunkMQ3SR4YOcjs.a.call(void 0, {requiring2Args:1,requiring3Args:1},{requiring2Args:(e,r)=>e+r,requiring3Args:(e,r,i)=>e+(_nullishCoalesce(r, () => (0)))+i})}),it("accept function whose second and subsequent arguments are optional",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {arg2Optional:1,arg2arg3Optional:1},{arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0});expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{_chunkMQ3SR4YOcjs.a.call(void 0, {quartile:[1,2]},{quartile:[_chunkSRZSHSZDcjs.a.call(void 0, 1),_chunkSRZSHSZDcjs.a.call(void 0, -1)]})}),it("doesn't provide typing for symbol key evolvers",()=>{let e=Symbol("a");_chunkMQ3SR4YOcjs.a.call(void 0, {[e]:"hello"},{[e]:_chunkMLLA7SGZcjs.a.call(void 0, )})})});describe("data last",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},_chunkMQ3SR4YOcjs.a.call(void 0, {id:_chunkSRZSHSZDcjs.a.call(void 0, 1),quartile:c,time:{elapsed:_chunkSRZSHSZDcjs.a.call(void 0, 1),remaining:_chunkSRZSHSZDcjs.a.call(void 0, -1)}}));expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {n:100},_chunkMQ3SR4YOcjs.a.call(void 0, {n:_chunkSRZSHSZDcjs.a.call(void 0, 1)}));expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {first:1,nested:{second:2,third:3}},_chunkMQ3SR4YOcjs.a.call(void 0, {nested:{second:_chunkSRZSHSZDcjs.a.call(void 0, -1),third:_chunkSRZSHSZDcjs.a.call(void 0, 1)}}));expectTypeOf(e).toEqualTypeOf()}),it("ignores undefined transformations",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {n:0},_chunkMQ3SR4YOcjs.a.call(void 0, {}));expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},_chunkMQ3SR4YOcjs.a.call(void 0, {array:_chunkQ4B5JNZScjs.a.call(void 0, ),nestedObj:{a:r=>_chunk7EJQW5L6cjs.a.call(void 0, r,"b","Set")},objAry:r=>_chunkWW7P3TAUcjs.a.call(void 0, r,_chunkINAPFYB2cjs.a.call(void 0, ["b"]))}));expectTypeOf(e).toEqualTypeOf()}),describe("it can detect mismatch of parameters and arguments",()=>{it('detect property "number" are incompatible',()=>{_chunkI6VXEY44cjs.a.call(void 0, {number:"1",array:["1","2","3"]},_chunkMQ3SR4YOcjs.a.call(void 0, {number:_chunkSRZSHSZDcjs.a.call(void 0, 1),array:_chunkQ4B5JNZScjs.a.call(void 0, )}))}),it('detect property "array" are incompatible',()=>{_chunkI6VXEY44cjs.a.call(void 0, {number:1,array:["1","2","3"]},_chunkMQ3SR4YOcjs.a.call(void 0, {number:_chunkSRZSHSZDcjs.a.call(void 0, 1),array:e=>e.length}))})}),it("does not accept function that require multiple arguments",()=>{_chunkI6VXEY44cjs.a.call(void 0, {requiring2Args:1},_chunkMQ3SR4YOcjs.a.call(void 0, {requiring2Args:(e,r)=>e+r}))}),it("accept function whose second and subsequent arguments are optional",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {arg2Optional:1,arg2arg3Optional:1},_chunkMQ3SR4YOcjs.a.call(void 0, {arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0}));expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{_chunkI6VXEY44cjs.a.call(void 0, {quartile:[1,2]},_chunkMQ3SR4YOcjs.a.call(void 0, {quartile:[_chunkSRZSHSZDcjs.a.call(void 0, 1),_chunkSRZSHSZDcjs.a.call(void 0, -1)]}))})});
1
+ "use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunk7EJQW5L6cjs = require('./chunk-7EJQW5L6.cjs');var _chunkQVDYQ7ZEcjs = require('./chunk-QVDYQ7ZE.cjs');var _chunkINAPFYB2cjs = require('./chunk-INAPFYB2.cjs');var _chunkWW7P3TAUcjs = require('./chunk-WW7P3TAU.cjs');var _chunkQ4B5JNZScjs = require('./chunk-Q4B5JNZS.cjs');var _chunkMQ3SR4YOcjs = require('./chunk-MQ3SR4YO.cjs');var _chunkAQRYBCA3cjs = require('./chunk-AQRYBCA3.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-G66EZBJS.cjs');var _chunkSRZSHSZDcjs = require('./chunk-SRZSHSZD.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');var c=_chunkQVDYQ7ZEcjs.a.call(void 0, (e,r)=>_chunkSRZSHSZDcjs.a.call(void 0, e,r),0);describe("data first",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{id:_chunkSRZSHSZDcjs.a.call(void 0, 1),quartile:c,time:{elapsed:_chunkSRZSHSZDcjs.a.call(void 0, 1),remaining:_chunkSRZSHSZDcjs.a.call(void 0, -1)}});expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {n:100},{n:_chunkSRZSHSZDcjs.a.call(void 0, 1)});expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {first:1,nested:{second:2,third:3}},{nested:{second:_chunkSRZSHSZDcjs.a.call(void 0, -1),third:_chunkSRZSHSZDcjs.a.call(void 0, 1)}});expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},{array:_chunkQ4B5JNZScjs.a.call(void 0, ),nestedObj:{a:r=>_chunk7EJQW5L6cjs.a.call(void 0, r,"b","Set")},objAry:r=>_chunkWW7P3TAUcjs.a.call(void 0, r,_chunkINAPFYB2cjs.a.call(void 0, ["b"]))});expectTypeOf(e).toEqualTypeOf()}),describe("type reflection",()=>{it("can reflect type of data to function of evolver object",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:r=>r});expectTypeOf(e).toEqualTypeOf()}),it("can reflect type of data to function of nested evolver object",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:{elapsed:r=>r,remaining:r=>r}});expectTypeOf(e).toEqualTypeOf()})}),it("can detect mismatch of parameters and arguments",()=>{_chunkMQ3SR4YOcjs.a.call(void 0, {number:"1",array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:"0",b:0},{a:1,b:1}]},{number:_chunkSRZSHSZDcjs.a.call(void 0, 1),array:e=>e.length,nestedObj:{a:_chunk7EJQW5L6cjs.a.call(void 0, "b",0)},objAry:_chunkWW7P3TAUcjs.a.call(void 0, _chunkINAPFYB2cjs.a.call(void 0, ["b"]))})}),it("does not accept function that require multiple arguments",()=>{_chunkMQ3SR4YOcjs.a.call(void 0, {requiring2Args:1,requiring3Args:1},{requiring2Args:(e,r)=>e+r,requiring3Args:(e,r,i)=>e+(_nullishCoalesce(r, () => (0)))+i})}),it("accept function whose second and subsequent arguments are optional",()=>{let e=_chunkMQ3SR4YOcjs.a.call(void 0, {arg2Optional:1,arg2arg3Optional:1},{arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0});expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{_chunkMQ3SR4YOcjs.a.call(void 0, {quartile:[1,2]},{quartile:[_chunkSRZSHSZDcjs.a.call(void 0, 1),_chunkSRZSHSZDcjs.a.call(void 0, -1)]})}),it("doesn't provide typing for symbol key evolvers",()=>{let e=Symbol("a");_chunkMQ3SR4YOcjs.a.call(void 0, {[e]:"hello"},{[e]:_chunkAQRYBCA3cjs.a.call(void 0, )})})});describe("data last",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},_chunkMQ3SR4YOcjs.a.call(void 0, {id:_chunkSRZSHSZDcjs.a.call(void 0, 1),quartile:c,time:{elapsed:_chunkSRZSHSZDcjs.a.call(void 0, 1),remaining:_chunkSRZSHSZDcjs.a.call(void 0, -1)}}));expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {n:100},_chunkMQ3SR4YOcjs.a.call(void 0, {n:_chunkSRZSHSZDcjs.a.call(void 0, 1)}));expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {first:1,nested:{second:2,third:3}},_chunkMQ3SR4YOcjs.a.call(void 0, {nested:{second:_chunkSRZSHSZDcjs.a.call(void 0, -1),third:_chunkSRZSHSZDcjs.a.call(void 0, 1)}}));expectTypeOf(e).toEqualTypeOf()}),it("ignores undefined transformations",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {n:0},_chunkMQ3SR4YOcjs.a.call(void 0, {}));expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},_chunkMQ3SR4YOcjs.a.call(void 0, {array:_chunkQ4B5JNZScjs.a.call(void 0, ),nestedObj:{a:r=>_chunk7EJQW5L6cjs.a.call(void 0, r,"b","Set")},objAry:r=>_chunkWW7P3TAUcjs.a.call(void 0, r,_chunkINAPFYB2cjs.a.call(void 0, ["b"]))}));expectTypeOf(e).toEqualTypeOf()}),describe("it can detect mismatch of parameters and arguments",()=>{it('detect property "number" are incompatible',()=>{_chunkY7L64OLNcjs.a.call(void 0, {number:"1",array:["1","2","3"]},_chunkMQ3SR4YOcjs.a.call(void 0, {number:_chunkSRZSHSZDcjs.a.call(void 0, 1),array:_chunkQ4B5JNZScjs.a.call(void 0, )}))}),it('detect property "array" are incompatible',()=>{_chunkY7L64OLNcjs.a.call(void 0, {number:1,array:["1","2","3"]},_chunkMQ3SR4YOcjs.a.call(void 0, {number:_chunkSRZSHSZDcjs.a.call(void 0, 1),array:e=>e.length}))})}),it("does not accept function that require multiple arguments",()=>{_chunkY7L64OLNcjs.a.call(void 0, {requiring2Args:1},_chunkMQ3SR4YOcjs.a.call(void 0, {requiring2Args:(e,r)=>e+r}))}),it("accept function whose second and subsequent arguments are optional",()=>{let e=_chunkY7L64OLNcjs.a.call(void 0, {arg2Optional:1,arg2arg3Optional:1},_chunkMQ3SR4YOcjs.a.call(void 0, {arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0}));expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{_chunkY7L64OLNcjs.a.call(void 0, {quartile:[1,2]},_chunkMQ3SR4YOcjs.a.call(void 0, {quartile:[_chunkSRZSHSZDcjs.a.call(void 0, 1),_chunkSRZSHSZDcjs.a.call(void 0, -1)]}))})});
@@ -1 +1 @@
1
- import{a as s}from"./chunk-QIM2PMWS.js";import{a as l}from"./chunk-7DDJ7DZF.js";import{a as m}from"./chunk-KTMLSQQ7.js";import{a as o}from"./chunk-QRDGUNHT.js";import{a as u}from"./chunk-J6L2AOTY.js";import{a as t}from"./chunk-VJMHXGZD.js";import{a as d}from"./chunk-WUAU3LTQ.js";import{a}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-73BYESBE.js";import{a as n}from"./chunk-SVOK32ZP.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";var c=l((e,r)=>n(e,r),0);describe("data first",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=t({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{id:n(1),quartile:c,time:{elapsed:n(1),remaining:n(-1)}});expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=t({n:100},{n:n(1)});expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=t({first:1,nested:{second:2,third:3}},{nested:{second:n(-1),third:n(1)}});expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=t({array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},{array:u(),nestedObj:{a:r=>s(r,"b","Set")},objAry:r=>o(r,m(["b"]))});expectTypeOf(e).toEqualTypeOf()}),describe("type reflection",()=>{it("can reflect type of data to function of evolver object",()=>{let e=t({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:r=>r});expectTypeOf(e).toEqualTypeOf()}),it("can reflect type of data to function of nested evolver object",()=>{let e=t({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:{elapsed:r=>r,remaining:r=>r}});expectTypeOf(e).toEqualTypeOf()})}),it("can detect mismatch of parameters and arguments",()=>{t({number:"1",array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:"0",b:0},{a:1,b:1}]},{number:n(1),array:e=>e.length,nestedObj:{a:s("b",0)},objAry:o(m(["b"]))})}),it("does not accept function that require multiple arguments",()=>{t({requiring2Args:1,requiring3Args:1},{requiring2Args:(e,r)=>e+r,requiring3Args:(e,r,i)=>e+(r??0)+i})}),it("accept function whose second and subsequent arguments are optional",()=>{let e=t({arg2Optional:1,arg2arg3Optional:1},{arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0});expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{t({quartile:[1,2]},{quartile:[n(1),n(-1)]})}),it("doesn't provide typing for symbol key evolvers",()=>{let e=Symbol("a");t({[e]:"hello"},{[e]:d()})})});describe("data last",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=a({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},t({id:n(1),quartile:c,time:{elapsed:n(1),remaining:n(-1)}}));expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=a({n:100},t({n:n(1)}));expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=a({first:1,nested:{second:2,third:3}},t({nested:{second:n(-1),third:n(1)}}));expectTypeOf(e).toEqualTypeOf()}),it("ignores undefined transformations",()=>{let e=a({n:0},t({}));expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=a({array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},t({array:u(),nestedObj:{a:r=>s(r,"b","Set")},objAry:r=>o(r,m(["b"]))}));expectTypeOf(e).toEqualTypeOf()}),describe("it can detect mismatch of parameters and arguments",()=>{it('detect property "number" are incompatible',()=>{a({number:"1",array:["1","2","3"]},t({number:n(1),array:u()}))}),it('detect property "array" are incompatible',()=>{a({number:1,array:["1","2","3"]},t({number:n(1),array:e=>e.length}))})}),it("does not accept function that require multiple arguments",()=>{a({requiring2Args:1},t({requiring2Args:(e,r)=>e+r}))}),it("accept function whose second and subsequent arguments are optional",()=>{let e=a({arg2Optional:1,arg2arg3Optional:1},t({arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0}));expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{a({quartile:[1,2]},t({quartile:[n(1),n(-1)]}))})});
1
+ import{a as s}from"./chunk-QIM2PMWS.js";import{a as l}from"./chunk-7DDJ7DZF.js";import{a as m}from"./chunk-KTMLSQQ7.js";import{a as o}from"./chunk-QRDGUNHT.js";import{a as u}from"./chunk-J6L2AOTY.js";import{a as t}from"./chunk-VJMHXGZD.js";import{a as d}from"./chunk-46GBCFAG.js";import{a}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-73BYESBE.js";import{a as n}from"./chunk-SVOK32ZP.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";var c=l((e,r)=>n(e,r),0);describe("data first",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=t({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{id:n(1),quartile:c,time:{elapsed:n(1),remaining:n(-1)}});expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=t({n:100},{n:n(1)});expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=t({first:1,nested:{second:2,third:3}},{nested:{second:n(-1),third:n(1)}});expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=t({array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},{array:u(),nestedObj:{a:r=>s(r,"b","Set")},objAry:r=>o(r,m(["b"]))});expectTypeOf(e).toEqualTypeOf()}),describe("type reflection",()=>{it("can reflect type of data to function of evolver object",()=>{let e=t({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:r=>r});expectTypeOf(e).toEqualTypeOf()}),it("can reflect type of data to function of nested evolver object",()=>{let e=t({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},{count:r=>r,quartile:r=>r,time:{elapsed:r=>r,remaining:r=>r}});expectTypeOf(e).toEqualTypeOf()})}),it("can detect mismatch of parameters and arguments",()=>{t({number:"1",array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:"0",b:0},{a:1,b:1}]},{number:n(1),array:e=>e.length,nestedObj:{a:s("b",0)},objAry:o(m(["b"]))})}),it("does not accept function that require multiple arguments",()=>{t({requiring2Args:1,requiring3Args:1},{requiring2Args:(e,r)=>e+r,requiring3Args:(e,r,i)=>e+(r??0)+i})}),it("accept function whose second and subsequent arguments are optional",()=>{let e=t({arg2Optional:1,arg2arg3Optional:1},{arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0});expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{t({quartile:[1,2]},{quartile:[n(1),n(-1)]})}),it("doesn't provide typing for symbol key evolvers",()=>{let e=Symbol("a");t({[e]:"hello"},{[e]:d()})})});describe("data last",()=>{it("creates a new object by evolving the `data` according to the `transformation` functions",()=>{let e=a({id:1,quartile:[1,2,3,4],time:{elapsed:100,remaining:1400}},t({id:n(1),quartile:c,time:{elapsed:n(1),remaining:n(-1)}}));expectTypeOf(e).toEqualTypeOf()}),it("is not destructive and is immutable",()=>{let e=a({n:100},t({n:n(1)}));expectTypeOf(e).toEqualTypeOf()}),it("is recursive",()=>{let e=a({first:1,nested:{second:2,third:3}},t({nested:{second:n(-1),third:n(1)}}));expectTypeOf(e).toEqualTypeOf()}),it("ignores undefined transformations",()=>{let e=a({n:0},t({}));expectTypeOf(e).toEqualTypeOf()}),it("can handle data that is complex nested objects",()=>{let e=a({array:["1","2","3"],nestedObj:{a:{b:"c"}},objAry:[{a:0,b:0},{a:1,b:1}]},t({array:u(),nestedObj:{a:r=>s(r,"b","Set")},objAry:r=>o(r,m(["b"]))}));expectTypeOf(e).toEqualTypeOf()}),describe("it can detect mismatch of parameters and arguments",()=>{it('detect property "number" are incompatible',()=>{a({number:"1",array:["1","2","3"]},t({number:n(1),array:u()}))}),it('detect property "array" are incompatible',()=>{a({number:1,array:["1","2","3"]},t({number:n(1),array:e=>e.length}))})}),it("does not accept function that require multiple arguments",()=>{a({requiring2Args:1},t({requiring2Args:(e,r)=>e+r}))}),it("accept function whose second and subsequent arguments are optional",()=>{let e=a({arg2Optional:1,arg2arg3Optional:1},t({arg2Optional:(r,i)=>i===void 0,arg2arg3Optional:(r,i,b)=>i===void 0&&b===void 0}));expectTypeOf(e).toEqualTypeOf()}),it("can not handle function arrays.",()=>{a({quartile:[1,2]},t({quartile:[n(1),n(-1)]}))})});
package/dist/filter.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7IYJC2PMcjs = require('./chunk-7IYJC2PM.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');exports.filter = _chunk7IYJC2PMcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkC6NFG7IScjs = require('./chunk-C6NFG7IS.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');exports.filter = _chunkC6NFG7IScjs.a;
package/dist/filter.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-BGPRJNRQ.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as filter};
1
+ import{a}from"./chunk-SOCUEKNU.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as filter};
@@ -1 +1 @@
1
- "use strict";var _chunk7IYJC2PMcjs = require('./chunk-7IYJC2PM.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data_first",()=>{it("filter",()=>{let t=_chunk7IYJC2PMcjs.a.call(void 0, [1,2,3],e=>e%2===1);expectTypeOf(t).toEqualTypeOf()}),it("data_first with typescript guard",()=>{let t=_chunk7IYJC2PMcjs.a.call(void 0, [1,2,3,"abc",!0],i);expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=_chunk7IYJC2PMcjs.a.call(void 0, [1,2,3],(e,a)=>e%2===1&&a!==1);expectTypeOf(t).toEqualTypeOf()})});describe("data_last",()=>{it("filter",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,2,3],_chunk7IYJC2PMcjs.a.call(void 0, e=>e%2===1));expectTypeOf(t).toEqualTypeOf()}),it("filter with typescript guard",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,2,3,!1,"text"],_chunk7IYJC2PMcjs.a.call(void 0, i));expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,2,3],_chunk7IYJC2PMcjs.a.call(void 0, (e,a)=>e%2===1&&a!==1));expectTypeOf(t).toEqualTypeOf()})});function i(t){return typeof t=="number"}
1
+ "use strict";var _chunkC6NFG7IScjs = require('./chunk-C6NFG7IS.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data_first",()=>{it("filter",()=>{let t=_chunkC6NFG7IScjs.a.call(void 0, [1,2,3],e=>e%2===1);expectTypeOf(t).toEqualTypeOf()}),it("data_first with typescript guard",()=>{let t=_chunkC6NFG7IScjs.a.call(void 0, [1,2,3,"abc",!0],i);expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=_chunkC6NFG7IScjs.a.call(void 0, [1,2,3],(e,a)=>e%2===1&&a!==1);expectTypeOf(t).toEqualTypeOf()})});describe("data_last",()=>{it("filter",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3],_chunkC6NFG7IScjs.a.call(void 0, e=>e%2===1));expectTypeOf(t).toEqualTypeOf()}),it("filter with typescript guard",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3,!1,"text"],_chunkC6NFG7IScjs.a.call(void 0, i));expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=_chunkY7L64OLNcjs.a.call(void 0, [1,2,3],_chunkC6NFG7IScjs.a.call(void 0, (e,a)=>e%2===1&&a!==1));expectTypeOf(t).toEqualTypeOf()})});function i(t){return typeof t=="number"}
@@ -1 +1 @@
1
- import{a as r}from"./chunk-BGPRJNRQ.js";import{a as s}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data_first",()=>{it("filter",()=>{let t=r([1,2,3],e=>e%2===1);expectTypeOf(t).toEqualTypeOf()}),it("data_first with typescript guard",()=>{let t=r([1,2,3,"abc",!0],i);expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=r([1,2,3],(e,a)=>e%2===1&&a!==1);expectTypeOf(t).toEqualTypeOf()})});describe("data_last",()=>{it("filter",()=>{let t=s([1,2,3],r(e=>e%2===1));expectTypeOf(t).toEqualTypeOf()}),it("filter with typescript guard",()=>{let t=s([1,2,3,!1,"text"],r(i));expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=s([1,2,3],r((e,a)=>e%2===1&&a!==1));expectTypeOf(t).toEqualTypeOf()})});function i(t){return typeof t=="number"}
1
+ import{a as r}from"./chunk-SOCUEKNU.js";import{a as s}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data_first",()=>{it("filter",()=>{let t=r([1,2,3],e=>e%2===1);expectTypeOf(t).toEqualTypeOf()}),it("data_first with typescript guard",()=>{let t=r([1,2,3,"abc",!0],i);expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=r([1,2,3],(e,a)=>e%2===1&&a!==1);expectTypeOf(t).toEqualTypeOf()})});describe("data_last",()=>{it("filter",()=>{let t=s([1,2,3],r(e=>e%2===1));expectTypeOf(t).toEqualTypeOf()}),it("filter with typescript guard",()=>{let t=s([1,2,3,!1,"text"],r(i));expectTypeOf(t).toEqualTypeOf()}),it("filter indexed",()=>{let t=s([1,2,3],r((e,a)=>e%2===1&&a!==1));expectTypeOf(t).toEqualTypeOf()})});function i(t){return typeof t=="number"}
package/dist/find.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkU32YSACLcjs = require('./chunk-U32YSACL.cjs');require('./chunk-GPGITOFN.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');exports.find = _chunkU32YSACLcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCT4EPN4Qcjs = require('./chunk-CT4EPN4Q.cjs');require('./chunk-GPGITOFN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');exports.find = _chunkCT4EPN4Qcjs.a;
package/dist/find.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-BF6VQFQK.js";import"./chunk-SME5FGMA.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as find};
1
+ import{a}from"./chunk-FFGIG2SO.js";import"./chunk-SME5FGMA.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as find};
@@ -1 +1 @@
1
- "use strict";var _chunkU32YSACLcjs = require('./chunk-U32YSACL.cjs');require('./chunk-GPGITOFN.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("can narrow types",()=>{let r=_chunkU32YSACLcjs.a.call(void 0, [1,"a"],_chunkEHJK4JRFcjs.a);expectTypeOf(r).toEqualTypeOf()});
1
+ "use strict";var _chunkCT4EPN4Qcjs = require('./chunk-CT4EPN4Q.cjs');require('./chunk-GPGITOFN.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("can narrow types",()=>{let r=_chunkCT4EPN4Qcjs.a.call(void 0, [1,"a"],_chunkEHJK4JRFcjs.a);expectTypeOf(r).toEqualTypeOf()});
@@ -1 +1 @@
1
- import{a as e}from"./chunk-BF6VQFQK.js";import"./chunk-SME5FGMA.js";import{a as t}from"./chunk-UYLVIAK4.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("can narrow types",()=>{let r=e([1,"a"],t);expectTypeOf(r).toEqualTypeOf()});
1
+ import{a as e}from"./chunk-FFGIG2SO.js";import"./chunk-SME5FGMA.js";import{a as t}from"./chunk-UYLVIAK4.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("can narrow types",()=>{let r=e([1,"a"],t);expectTypeOf(r).toEqualTypeOf()});
@@ -1,4 +1,4 @@
1
- import { I as IterableContainer, a as NonEmptyArray } from './types-BE3YOWVA.cjs';
1
+ import { I as IterableContainer, a as NonEmptyArray } from './types-CC8iZVKO.cjs';
2
2
  import { O as OrderRule } from './curry-order-rules-DETxSzle.cjs';
3
3
  import 'type-fest';
4
4
 
@@ -1,4 +1,4 @@
1
- import { I as IterableContainer, a as NonEmptyArray } from './types-BE3YOWVA.js';
1
+ import { I as IterableContainer, a as NonEmptyArray } from './types-CC8iZVKO.js';
2
2
  import { O as OrderRule } from './curry-order-rules-DETxSzle.js';
3
3
  import 'type-fest';
4
4
 
@@ -1 +1 @@
1
- "use strict";var _chunkMLLA7SGZcjs = require('./chunk-MLLA7SGZ.cjs');var _chunkDHNCWVVTcjs = require('./chunk-DHNCWVVT.cjs');require('./chunk-FWQYL4Y4.cjs');require('./chunk-G66EZBJS.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("can return undefined on arrays",()=>{let t=_chunkDHNCWVVTcjs.a.call(void 0, [1,2,3],_chunkMLLA7SGZcjs.a.call(void 0, ));expectTypeOf(t).toBeNullable()});it("can't return undefined on non-empty array",()=>{let t=_chunkDHNCWVVTcjs.a.call(void 0, [1,2,3],_chunkMLLA7SGZcjs.a.call(void 0, ));expectTypeOf(t).not.toBeNullable()});it("only returns null on the empty array",()=>{let t=_chunkDHNCWVVTcjs.a.call(void 0, [],_chunkMLLA7SGZcjs.a.call(void 0, ));expectTypeOf(t).toBeUndefined()});
1
+ "use strict";var _chunkAQRYBCA3cjs = require('./chunk-AQRYBCA3.cjs');var _chunkDHNCWVVTcjs = require('./chunk-DHNCWVVT.cjs');require('./chunk-FWQYL4Y4.cjs');require('./chunk-G66EZBJS.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("can return undefined on arrays",()=>{let t=_chunkDHNCWVVTcjs.a.call(void 0, [1,2,3],_chunkAQRYBCA3cjs.a.call(void 0, ));expectTypeOf(t).toBeNullable()});it("can't return undefined on non-empty array",()=>{let t=_chunkDHNCWVVTcjs.a.call(void 0, [1,2,3],_chunkAQRYBCA3cjs.a.call(void 0, ));expectTypeOf(t).not.toBeNullable()});it("only returns null on the empty array",()=>{let t=_chunkDHNCWVVTcjs.a.call(void 0, [],_chunkAQRYBCA3cjs.a.call(void 0, ));expectTypeOf(t).toBeUndefined()});
@@ -1 +1 @@
1
- import{a as n}from"./chunk-WUAU3LTQ.js";import{a as e}from"./chunk-J5PNUDDU.js";import"./chunk-JXXXUJM5.js";import"./chunk-73BYESBE.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("can return undefined on arrays",()=>{let t=e([1,2,3],n());expectTypeOf(t).toBeNullable()});it("can't return undefined on non-empty array",()=>{let t=e([1,2,3],n());expectTypeOf(t).not.toBeNullable()});it("only returns null on the empty array",()=>{let t=e([],n());expectTypeOf(t).toBeUndefined()});
1
+ import{a as n}from"./chunk-46GBCFAG.js";import{a as e}from"./chunk-J5PNUDDU.js";import"./chunk-JXXXUJM5.js";import"./chunk-73BYESBE.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("can return undefined on arrays",()=>{let t=e([1,2,3],n());expectTypeOf(t).toBeNullable()});it("can't return undefined on non-empty array",()=>{let t=e([1,2,3],n());expectTypeOf(t).not.toBeNullable()});it("only returns null on the empty array",()=>{let t=e([],n());expectTypeOf(t).toBeUndefined()});
package/dist/first.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as IterableContainer } from './types-BE3YOWVA.cjs';
1
+ import { I as IterableContainer } from './types-CC8iZVKO.cjs';
2
2
  import 'type-fest';
3
3
 
4
4
  type First<T extends IterableContainer> = T extends [] ? undefined : T extends readonly [unknown, ...Array<unknown>] ? T[0] : T extends readonly [...infer Pre, infer Last] ? Last | Pre[0] : T[0] | undefined;
package/dist/first.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as IterableContainer } from './types-BE3YOWVA.js';
1
+ import { I as IterableContainer } from './types-CC8iZVKO.js';
2
2
  import 'type-fest';
3
3
 
4
4
  type First<T extends IterableContainer> = T extends [] ? undefined : T extends readonly [unknown, ...Array<unknown>] ? T[0] : T extends readonly [...infer Pre, infer Last] ? Last | Pre[0] : T[0] | undefined;
package/dist/flat.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIZZFU26Scjs = require('./chunk-IZZFU26S.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-7T4AVFYJ.cjs');exports.flat = _chunkIZZFU26Scjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK43ZLBUScjs = require('./chunk-K43ZLBUS.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-7T4AVFYJ.cjs');exports.flat = _chunkK43ZLBUScjs.a;
package/dist/flat.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IsNumericLiteral } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.cjs';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.cjs';
3
3
 
4
4
  declare const DEFAULT_DEPTH = 1;
5
5
  type FlatArray<T, Depth extends number, Iteration extends ReadonlyArray<unknown> = []> = Depth extends Iteration['length'] ? T : T extends readonly [] ? [
package/dist/flat.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IsNumericLiteral } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.js';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.js';
3
3
 
4
4
  declare const DEFAULT_DEPTH = 1;
5
5
  type FlatArray<T, Depth extends number, Iteration extends ReadonlyArray<unknown> = []> = Depth extends Iteration['length'] ? T : T extends readonly [] ? [
package/dist/flat.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-A62OZTSJ.js";import"./chunk-MYLYERXO.js";import"./chunk-KQGY2DBY.js";export{a as flat};
1
+ import{a}from"./chunk-6B6SBF6V.js";import"./chunk-T4LCVT74.js";import"./chunk-KQGY2DBY.js";export{a as flat};
@@ -1 +1 @@
1
- "use strict";var _chunkIZZFU26Scjs = require('./chunk-IZZFU26S.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-7T4AVFYJ.cjs');it("works on empty arrays",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works on already-flat arrays",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works on a single level of nesting",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed types",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed levels of nesting",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works when depth is deeper than the array",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],10);expectTypeOf(r).toEqualTypeOf()});it("works when depth is really really really really big",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],9999999);expectTypeOf(r).toEqualTypeOf()});it("keeps the typing of trivial tuples",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [1,2],1);expectTypeOf(r).toEqualTypeOf()});it("Works on simple tuples",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[1,2],[3,4]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with different levels of nesting",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [1,[2,3],[4,[5,6]]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with depth>1",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [1,[2,3],[4,[5,6]]],2);expectTypeOf(r).toEqualTypeOf()});it("works with tuples with a lot of nesting",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[[[1]],[[[[2]]]]],[[[[3,4],5]]]],10);expectTypeOf(r).toEqualTypeOf()});it("works with a mix of simple arrays and tuples",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with multiple types nested in a tuple",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[],[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [1,[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items, deeply",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[1],[]],2);expectTypeOf(r).toEqualTypeOf()});it("works on non-empty arrays",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[1]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [1,[],4],2);expectTypeOf(r).toEqualTypeOf()});it("works with depths beyond 20",()=>{let r=_chunkIZZFU26Scjs.a.call(void 0, [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],99);expectTypeOf(r).toEqualTypeOf()});it("doesn't accept non-literal depths",()=>{_chunkIZZFU26Scjs.a.call(void 0, [],1)});it("doesn't accept built-in 'infinite' numbers",()=>{_chunkIZZFU26Scjs.a.call(void 0, [],Number.POSITIVE_INFINITY),_chunkIZZFU26Scjs.a.call(void 0, [],Number.MAX_VALUE),_chunkIZZFU26Scjs.a.call(void 0, [],Number.POSITIVE_INFINITY)});
1
+ "use strict";var _chunkK43ZLBUScjs = require('./chunk-K43ZLBUS.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-7T4AVFYJ.cjs');it("works on empty arrays",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works on already-flat arrays",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works on a single level of nesting",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed types",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed levels of nesting",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],1);expectTypeOf(r).toEqualTypeOf()});it("works when depth is deeper than the array",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],10);expectTypeOf(r).toEqualTypeOf()});it("works when depth is really really really really big",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],9999999);expectTypeOf(r).toEqualTypeOf()});it("keeps the typing of trivial tuples",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [1,2],1);expectTypeOf(r).toEqualTypeOf()});it("Works on simple tuples",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[1,2],[3,4]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with different levels of nesting",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [1,[2,3],[4,[5,6]]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with depth>1",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [1,[2,3],[4,[5,6]]],2);expectTypeOf(r).toEqualTypeOf()});it("works with tuples with a lot of nesting",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[[[1]],[[[[2]]]]],[[[[3,4],5]]]],10);expectTypeOf(r).toEqualTypeOf()});it("works with a mix of simple arrays and tuples",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with multiple types nested in a tuple",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[],[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [1,[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items, deeply",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[1],[]],2);expectTypeOf(r).toEqualTypeOf()});it("works on non-empty arrays",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[1]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [],2);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [1,[],4],2);expectTypeOf(r).toEqualTypeOf()});it("works with depths beyond 20",()=>{let r=_chunkK43ZLBUScjs.a.call(void 0, [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],99);expectTypeOf(r).toEqualTypeOf()});it("doesn't accept non-literal depths",()=>{_chunkK43ZLBUScjs.a.call(void 0, [],1)});it("doesn't accept built-in 'infinite' numbers",()=>{_chunkK43ZLBUScjs.a.call(void 0, [],Number.POSITIVE_INFINITY),_chunkK43ZLBUScjs.a.call(void 0, [],Number.MAX_VALUE),_chunkK43ZLBUScjs.a.call(void 0, [],Number.POSITIVE_INFINITY)});
@@ -1 +1 @@
1
- import{a as t}from"./chunk-A62OZTSJ.js";import"./chunk-MYLYERXO.js";import"./chunk-KQGY2DBY.js";it("works on empty arrays",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works on already-flat arrays",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works on a single level of nesting",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed types",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed levels of nesting",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works when depth is deeper than the array",()=>{let r=t([],10);expectTypeOf(r).toEqualTypeOf()});it("works when depth is really really really really big",()=>{let r=t([],9999999);expectTypeOf(r).toEqualTypeOf()});it("keeps the typing of trivial tuples",()=>{let r=t([1,2],1);expectTypeOf(r).toEqualTypeOf()});it("Works on simple tuples",()=>{let r=t([[1,2],[3,4]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with different levels of nesting",()=>{let r=t([1,[2,3],[4,[5,6]]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with depth>1",()=>{let r=t([1,[2,3],[4,[5,6]]],2);expectTypeOf(r).toEqualTypeOf()});it("works with tuples with a lot of nesting",()=>{let r=t([[[[1]],[[[[2]]]]],[[[[3,4],5]]]],10);expectTypeOf(r).toEqualTypeOf()});it("works with a mix of simple arrays and tuples",()=>{let r=t([[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with multiple types nested in a tuple",()=>{let r=t([[],[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items",()=>{let r=t([1,[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items, deeply",()=>{let r=t([[1],[]],2);expectTypeOf(r).toEqualTypeOf()});it("works on non-empty arrays",()=>{let r=t([[1]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=t([],2);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=t([1,[],4],2);expectTypeOf(r).toEqualTypeOf()});it("works with depths beyond 20",()=>{let r=t([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],99);expectTypeOf(r).toEqualTypeOf()});it("doesn't accept non-literal depths",()=>{t([],1)});it("doesn't accept built-in 'infinite' numbers",()=>{t([],Number.POSITIVE_INFINITY),t([],Number.MAX_VALUE),t([],Number.POSITIVE_INFINITY)});
1
+ import{a as t}from"./chunk-6B6SBF6V.js";import"./chunk-T4LCVT74.js";import"./chunk-KQGY2DBY.js";it("works on empty arrays",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works on already-flat arrays",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works on a single level of nesting",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("stops after the first level of nesting (depth === 1)",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed types",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works with mixed levels of nesting",()=>{let r=t([],1);expectTypeOf(r).toEqualTypeOf()});it("works when depth is deeper than the array",()=>{let r=t([],10);expectTypeOf(r).toEqualTypeOf()});it("works when depth is really really really really big",()=>{let r=t([],9999999);expectTypeOf(r).toEqualTypeOf()});it("keeps the typing of trivial tuples",()=>{let r=t([1,2],1);expectTypeOf(r).toEqualTypeOf()});it("Works on simple tuples",()=>{let r=t([[1,2],[3,4]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with different levels of nesting",()=>{let r=t([1,[2,3],[4,[5,6]]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples with depth>1",()=>{let r=t([1,[2,3],[4,[5,6]]],2);expectTypeOf(r).toEqualTypeOf()});it("works with tuples with a lot of nesting",()=>{let r=t([[[[1]],[[[[2]]]]],[[[[3,4],5]]]],10);expectTypeOf(r).toEqualTypeOf()});it("works with a mix of simple arrays and tuples",()=>{let r=t([[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with multiple types nested in a tuple",()=>{let r=t([[],[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items",()=>{let r=t([1,[]],1);expectTypeOf(r).toEqualTypeOf()});it("works with a tuple with mixed array and non array items, deeply",()=>{let r=t([[1],[]],2);expectTypeOf(r).toEqualTypeOf()});it("works on non-empty arrays",()=>{let r=t([[1]],1);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=t([],2);expectTypeOf(r).toEqualTypeOf()});it("works on tuples inside arrays",()=>{let r=t([1,[],4],2);expectTypeOf(r).toEqualTypeOf()});it("works with depths beyond 20",()=>{let r=t([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],99);expectTypeOf(r).toEqualTypeOf()});it("doesn't accept non-literal depths",()=>{t([],1)});it("doesn't accept built-in 'infinite' numbers",()=>{t([],Number.POSITIVE_INFINITY),t([],Number.MAX_VALUE),t([],Number.POSITIVE_INFINITY)});
@@ -1,4 +1,4 @@
1
- import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-BE3YOWVA.cjs';
1
+ import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-CC8iZVKO.cjs';
2
2
  import 'type-fest';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-BE3YOWVA.js';
1
+ import { E as EnumerableStringKeyedValueOf, b as EnumerableStringKeyOf } from './types-CC8iZVKO.js';
2
2
  import 'type-fest';
3
3
 
4
4
  /**
@@ -1 +1 @@
1
- "use strict";var _chunkKODMZU4Jcjs = require('./chunk-KODMZU4J.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("Typing is sound when only symbol keys",()=>{_chunkKODMZU4Jcjs.a.call(void 0, {[Symbol("a")]:4},(t,e)=>{expectTypeOf(e).toBeNever(),expectTypeOf(t).toBeNever()})});test("Symbol keys are ignored",()=>{_chunkKODMZU4Jcjs.a.call(void 0, {[Symbol("a")]:4,a:"hello",b:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("number keys are translated to strings",()=>{_chunkKODMZU4Jcjs.a.call(void 0, {123:"hello",456:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("union of records",()=>{let t={};_chunkKODMZU4Jcjs.a.call(void 0, t,(e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}),_chunkI6VXEY44cjs.a.call(void 0, t,_chunkKODMZU4Jcjs.a.call(void 0, (e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}))});
1
+ "use strict";var _chunkKODMZU4Jcjs = require('./chunk-KODMZU4J.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("Typing is sound when only symbol keys",()=>{_chunkKODMZU4Jcjs.a.call(void 0, {[Symbol("a")]:4},(t,e)=>{expectTypeOf(e).toBeNever(),expectTypeOf(t).toBeNever()})});test("Symbol keys are ignored",()=>{_chunkKODMZU4Jcjs.a.call(void 0, {[Symbol("a")]:4,a:"hello",b:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("number keys are translated to strings",()=>{_chunkKODMZU4Jcjs.a.call(void 0, {123:"hello",456:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("union of records",()=>{let t={};_chunkKODMZU4Jcjs.a.call(void 0, t,(e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}),_chunkY7L64OLNcjs.a.call(void 0, t,_chunkKODMZU4Jcjs.a.call(void 0, (e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}))});
@@ -1 +1 @@
1
- import{a as o}from"./chunk-HLKCHMAO.js";import{a as r}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("Typing is sound when only symbol keys",()=>{o({[Symbol("a")]:4},(t,e)=>{expectTypeOf(e).toBeNever(),expectTypeOf(t).toBeNever()})});test("Symbol keys are ignored",()=>{o({[Symbol("a")]:4,a:"hello",b:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("number keys are translated to strings",()=>{o({123:"hello",456:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("union of records",()=>{let t={};o(t,(e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}),r(t,o((e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}))});
1
+ import{a as o}from"./chunk-HLKCHMAO.js";import{a as r}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("Typing is sound when only symbol keys",()=>{o({[Symbol("a")]:4},(t,e)=>{expectTypeOf(e).toBeNever(),expectTypeOf(t).toBeNever()})});test("Symbol keys are ignored",()=>{o({[Symbol("a")]:4,a:"hello",b:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("number keys are translated to strings",()=>{o({123:"hello",456:!0},(t,e)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(t).toEqualTypeOf()})});test("union of records",()=>{let t={};o(t,(e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}),r(t,o((e,p)=>{expectTypeOf(p).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()}))});
@@ -1,5 +1,5 @@
1
1
  import { Writable } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.cjs';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.cjs';
3
3
 
4
4
  /**
5
5
  * Executes a provided function once for each array element. Equivalent to
@@ -1,5 +1,5 @@
1
1
  import { Writable } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.js';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.js';
3
3
 
4
4
  /**
5
5
  * Executes a provided function once for each array element. Equivalent to
@@ -1 +1 @@
1
- "use strict";var _chunkUHUFGDIScjs = require('./chunk-UHUFGDIS.cjs');var _chunkNULDWRPDcjs = require('./chunk-NULDWRPD.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("doesn't return anything on dataFirst invocations",()=>{let t=_chunkUHUFGDIScjs.a.call(void 0, [1,2,3],_chunkNULDWRPDcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()});it("passes the item type to the callback",()=>{_chunkI6VXEY44cjs.a.call(void 0, [1,2,3],_chunkUHUFGDIScjs.a.call(void 0, t=>{expectTypeOf(t).toEqualTypeOf()}))});it("maintains the array shape",()=>{_chunkI6VXEY44cjs.a.call(void 0, [1,"a"],_chunkUHUFGDIScjs.a.call(void 0, _chunkNULDWRPDcjs.a.call(void 0, )),r=>{expectTypeOf(r).toEqualTypeOf()})});it("makes the result mutable",()=>{_chunkI6VXEY44cjs.a.call(void 0, [],_chunkUHUFGDIScjs.a.call(void 0, _chunkNULDWRPDcjs.a.call(void 0, )),r=>{expectTypeOf(r).toEqualTypeOf()})});
1
+ "use strict";var _chunkUHUFGDIScjs = require('./chunk-UHUFGDIS.cjs');var _chunkWYRK6YJUcjs = require('./chunk-WYRK6YJU.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("doesn't return anything on dataFirst invocations",()=>{let t=_chunkUHUFGDIScjs.a.call(void 0, [1,2,3],_chunkWYRK6YJUcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()});it("passes the item type to the callback",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1,2,3],_chunkUHUFGDIScjs.a.call(void 0, t=>{expectTypeOf(t).toEqualTypeOf()}))});it("maintains the array shape",()=>{_chunkY7L64OLNcjs.a.call(void 0, [1,"a"],_chunkUHUFGDIScjs.a.call(void 0, _chunkWYRK6YJUcjs.a.call(void 0, )),r=>{expectTypeOf(r).toEqualTypeOf()})});it("makes the result mutable",()=>{_chunkY7L64OLNcjs.a.call(void 0, [],_chunkUHUFGDIScjs.a.call(void 0, _chunkWYRK6YJUcjs.a.call(void 0, )),r=>{expectTypeOf(r).toEqualTypeOf()})});
@@ -1 +1 @@
1
- import{a}from"./chunk-T2LJNGWI.js";import{a as o}from"./chunk-PHKKU45J.js";import{a as e}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("doesn't return anything on dataFirst invocations",()=>{let t=a([1,2,3],o());expectTypeOf(t).toEqualTypeOf()});it("passes the item type to the callback",()=>{e([1,2,3],a(t=>{expectTypeOf(t).toEqualTypeOf()}))});it("maintains the array shape",()=>{e([1,"a"],a(o()),r=>{expectTypeOf(r).toEqualTypeOf()})});it("makes the result mutable",()=>{e([],a(o()),r=>{expectTypeOf(r).toEqualTypeOf()})});
1
+ import{a}from"./chunk-T2LJNGWI.js";import{a as o}from"./chunk-AFO7BV2X.js";import{a as e}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("doesn't return anything on dataFirst invocations",()=>{let t=a([1,2,3],o());expectTypeOf(t).toEqualTypeOf()});it("passes the item type to the callback",()=>{e([1,2,3],a(t=>{expectTypeOf(t).toEqualTypeOf()}))});it("maintains the array shape",()=>{e([1,"a"],a(o()),r=>{expectTypeOf(r).toEqualTypeOf()})});it("makes the result mutable",()=>{e([],a(o()),r=>{expectTypeOf(r).toEqualTypeOf()})});
@@ -1,5 +1,5 @@
1
1
  import { Simplify } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.cjs';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.cjs';
3
3
 
4
4
  type Entry<Key extends PropertyKey = PropertyKey, Value = unknown> = readonly [
5
5
  key: Key,
@@ -1,5 +1,5 @@
1
1
  import { Simplify } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.js';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.js';
3
3
 
4
4
  type Entry<Key extends PropertyKey = PropertyKey, Value = unknown> = readonly [
5
5
  key: Key,
@@ -1,5 +1,5 @@
1
1
  import { Simplify } from 'type-fest';
2
- import { I as IterableContainer, c as ExactRecord } from './types-BE3YOWVA.cjs';
2
+ import { I as IterableContainer, c as ExactRecord } from './types-CC8iZVKO.cjs';
3
3
 
4
4
  type ExactlyOneKey<T, V> = T extends PropertyKey ? {
5
5
  [P in T]: V;
@@ -1,5 +1,5 @@
1
1
  import { Simplify } from 'type-fest';
2
- import { I as IterableContainer, c as ExactRecord } from './types-BE3YOWVA.js';
2
+ import { I as IterableContainer, c as ExactRecord } from './types-CC8iZVKO.js';
3
3
 
4
4
  type ExactlyOneKey<T, V> = T extends PropertyKey ? {
5
5
  [P in T]: V;
@@ -1 +1 @@
1
- "use strict";var _chunkGUZPDGVHcjs = require('./chunk-GUZPDGVH.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("empty array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()});test("fixed tuple",()=>{let e=["cat","dog"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()});describe("with simple keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","dog"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()})});describe("with literal union keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","mouse"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()})});describe("with string template keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["prefix_1"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["prefix_1","2_suffix"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),describe("number keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=[1],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=[1,2],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("literals",()=>{let e=[1,2,3],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()})})});test("typescript doesn't choke on huge literal unions",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()});
1
+ "use strict";var _chunkGUZPDGVHcjs = require('./chunk-GUZPDGVH.cjs');var _chunkY7L64OLNcjs = require('./chunk-Y7L64OLN.cjs');require('./chunk-SW6GJ7UA.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("empty array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()});test("fixed tuple",()=>{let e=["cat","dog"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()});describe("with simple keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","dog"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()})});describe("with literal union keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","mouse"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()})});describe("with string template keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["prefix_1"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["prefix_1","2_suffix"],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),describe("number keys",()=>{test("regular array",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=[1],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=[1,2],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()}),test("literals",()=>{let e=[1,2,3],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()})})});test("typescript doesn't choke on huge literal unions",()=>{let e=[],r=_chunkGUZPDGVHcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(r).toEqualTypeOf();let s=_chunkY7L64OLNcjs.a.call(void 0, e,_chunkGUZPDGVHcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, 1)));expectTypeOf(s).toEqualTypeOf()});
@@ -1 +1 @@
1
- import{a}from"./chunk-TT2VLICK.js";import{a as o}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import{a as t}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("empty array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()});test("fixed tuple",()=>{let e=["cat","dog"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()});describe("with simple keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","dog"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()})});describe("with literal union keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","mouse"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()})});describe("with string template keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["prefix_1"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["prefix_1","2_suffix"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),describe("number keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=[1],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=[1,2],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("literals",()=>{let e=[1,2,3],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()})})});test("typescript doesn't choke on huge literal unions",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()});
1
+ import{a}from"./chunk-TT2VLICK.js";import{a as o}from"./chunk-FOP5KNRT.js";import"./chunk-T4LCVT74.js";import{a as t}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("empty array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()});test("fixed tuple",()=>{let e=["cat","dog"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()});describe("with simple keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","dog"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()})});describe("with literal union keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["cat"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["cat","mouse"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()})});describe("with string template keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=["prefix_1"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=["prefix_1","2_suffix"],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),describe("number keys",()=>{test("regular array",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("non-empty array",()=>{let e=[1],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("fixed tuple",()=>{let e=[1,2],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()}),test("literals",()=>{let e=[1,2,3],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()})})});test("typescript doesn't choke on huge literal unions",()=>{let e=[],r=a(e,t(1));expectTypeOf(r).toEqualTypeOf();let s=o(e,a(t(1)));expectTypeOf(s).toEqualTypeOf()});
@@ -1,4 +1,4 @@
1
- import { c as ExactRecord, a as NonEmptyArray } from './types-BE3YOWVA.cjs';
1
+ import { c as ExactRecord, a as NonEmptyArray } from './types-CC8iZVKO.cjs';
2
2
  import 'type-fest';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { c as ExactRecord, a as NonEmptyArray } from './types-BE3YOWVA.js';
1
+ import { c as ExactRecord, a as NonEmptyArray } from './types-CC8iZVKO.js';
2
2
  import 'type-fest';
3
3
 
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { IsNumericLiteral } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.cjs';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.cjs';
3
3
 
4
4
  type ArraySetRequired<T extends IterableContainer, Min extends number, Iteration extends ReadonlyArray<unknown> = []> = number extends Min ? never : Iteration['length'] extends Min ? T : T extends readonly [] ? never : T extends [infer Head, ...infer Rest] ? [
5
5
  Head,
@@ -1,5 +1,5 @@
1
1
  import { IsNumericLiteral } from 'type-fest';
2
- import { I as IterableContainer } from './types-BE3YOWVA.js';
2
+ import { I as IterableContainer } from './types-CC8iZVKO.js';
3
3
 
4
4
  type ArraySetRequired<T extends IterableContainer, Min extends number, Iteration extends ReadonlyArray<unknown> = []> = number extends Min ? never : Iteration['length'] extends Min ? T : T extends readonly [] ? never : T extends [infer Head, ...infer Rest] ? [
5
5
  Head,
@@ -1,5 +1,5 @@
1
1
  import { Simplify } from 'type-fest';
2
- import { B as Branded } from './types-BE3YOWVA.cjs';
2
+ import { B as Branded } from './types-CC8iZVKO.cjs';
3
3
 
4
4
  declare const HAS_SUB_OBJECT_BRAND: unique symbol;
5
5
  type HasSubObjectGuard<T, S> = Simplify<Branded<S & T, typeof HAS_SUB_OBJECT_BRAND>>;
@@ -1,5 +1,5 @@
1
1
  import { Simplify } from 'type-fest';
2
- import { B as Branded } from './types-BE3YOWVA.js';
2
+ import { B as Branded } from './types-CC8iZVKO.js';
3
3
 
4
4
  declare const HAS_SUB_OBJECT_BRAND: unique symbol;
5
5
  type HasSubObjectGuard<T, S> = Simplify<Branded<S & T, typeof HAS_SUB_OBJECT_BRAND>>;