@stryke/helpers 0.9.14 → 0.9.22

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 (394) hide show
  1. package/CHANGELOG.md +419 -0
  2. package/README.md +33 -25
  3. package/dist/{arg-identity.d.ts → arg-identity-BIir8uzO.d.mts} +5 -1
  4. package/dist/arg-identity-BIir8uzO.d.mts.map +1 -0
  5. package/dist/arg-identity-BfviduMt.mjs +2 -0
  6. package/dist/arg-identity-BfviduMt.mjs.map +1 -0
  7. package/dist/arg-identity-C-pVjd0u.d.cts +14 -0
  8. package/dist/arg-identity-C-pVjd0u.d.cts.map +1 -0
  9. package/dist/arg-identity-dlKw6BsD.cjs +1 -0
  10. package/dist/arg-identity.cjs +1 -9
  11. package/dist/arg-identity.d.cts +2 -0
  12. package/dist/arg-identity.d.mts +2 -0
  13. package/dist/arg-identity.mjs +1 -1
  14. package/dist/debounce-C5O3IDKy.mjs +2 -0
  15. package/dist/debounce-C5O3IDKy.mjs.map +1 -0
  16. package/dist/{debounce.d.ts → debounce-CIMf8-Yr.d.mts} +10 -4
  17. package/dist/debounce-CIMf8-Yr.d.mts.map +1 -0
  18. package/dist/debounce-CLb-VvJv.d.cts +47 -0
  19. package/dist/debounce-CLb-VvJv.d.cts.map +1 -0
  20. package/dist/debounce-SIYbhEOF.cjs +1 -0
  21. package/dist/debounce.cjs +1 -24
  22. package/dist/debounce.d.cts +2 -0
  23. package/dist/debounce.d.mts +2 -0
  24. package/dist/debounce.mjs +1 -1
  25. package/dist/deep-clone-BlN5QTtW.mjs +2 -0
  26. package/dist/deep-clone-BlN5QTtW.mjs.map +1 -0
  27. package/dist/deep-clone-CoUy-Hrt.cjs +1 -0
  28. package/dist/{deep-clone.d.ts → deep-clone-CpLJcTgz.d.mts} +11 -12
  29. package/dist/deep-clone-CpLJcTgz.d.mts.map +1 -0
  30. package/dist/deep-clone-jRNy1xoj.d.cts +65 -0
  31. package/dist/deep-clone-jRNy1xoj.d.cts.map +1 -0
  32. package/dist/deep-clone.cjs +1 -62
  33. package/dist/deep-clone.d.cts +2 -0
  34. package/dist/deep-clone.d.mts +2 -0
  35. package/dist/deep-clone.mjs +1 -1
  36. package/dist/deep-merge-BDZ6c79O.mjs +2 -0
  37. package/dist/deep-merge-BDZ6c79O.mjs.map +1 -0
  38. package/dist/deep-merge-BpFjvumi.cjs +1 -0
  39. package/dist/deep-merge-C9qDSleg.d.cts +26 -0
  40. package/dist/deep-merge-C9qDSleg.d.cts.map +1 -0
  41. package/dist/deep-merge-eCT712Cv.d.mts +26 -0
  42. package/dist/deep-merge-eCT712Cv.d.mts.map +1 -0
  43. package/dist/deep-merge.cjs +1 -36
  44. package/dist/deep-merge.d.cts +2 -0
  45. package/dist/deep-merge.d.mts +2 -0
  46. package/dist/deep-merge.mjs +1 -1
  47. package/dist/{delay.d.ts → delay-Bd_sGzMj.d.mts} +9 -4
  48. package/dist/delay-Bd_sGzMj.d.mts.map +1 -0
  49. package/dist/delay-UwR_fCwt.cjs +1 -0
  50. package/dist/delay-VkcrQf1l.d.cts +77 -0
  51. package/dist/delay-VkcrQf1l.d.cts.map +1 -0
  52. package/dist/delay-wdNbY6sk.mjs +2 -0
  53. package/dist/delay-wdNbY6sk.mjs.map +1 -0
  54. package/dist/delay.cjs +1 -28
  55. package/dist/delay.d.cts +2 -0
  56. package/dist/delay.d.mts +2 -0
  57. package/dist/delay.mjs +1 -1
  58. package/dist/errors-BXYY8wXj.cjs +1 -0
  59. package/dist/errors-DWX9ET_b.mjs +2 -0
  60. package/dist/errors-DWX9ET_b.mjs.map +1 -0
  61. package/dist/errors.cjs +1 -18
  62. package/dist/errors.d.cts +16 -0
  63. package/dist/errors.d.cts.map +1 -0
  64. package/dist/errors.d.mts +16 -0
  65. package/dist/errors.d.mts.map +1 -0
  66. package/dist/errors.mjs +1 -1
  67. package/dist/filter-empty-5_nMg04e.cjs +1 -0
  68. package/dist/filter-empty-BMtd0K07.d.mts +5 -0
  69. package/dist/filter-empty-BMtd0K07.d.mts.map +1 -0
  70. package/dist/filter-empty-C2fq9M7o.d.cts +5 -0
  71. package/dist/filter-empty-C2fq9M7o.d.cts.map +1 -0
  72. package/dist/filter-empty-Dsc1ymCj.mjs +2 -0
  73. package/dist/filter-empty-Dsc1ymCj.mjs.map +1 -0
  74. package/dist/filter-empty.cjs +1 -9
  75. package/dist/filter-empty.d.cts +2 -0
  76. package/dist/filter-empty.d.mts +2 -0
  77. package/dist/filter-empty.mjs +1 -1
  78. package/dist/{flatten-object.d.ts → flatten-object-Bk2VT-b2.d.mts} +8 -6
  79. package/dist/flatten-object-Bk2VT-b2.d.mts.map +1 -0
  80. package/dist/flatten-object-D-EbEZqR.cjs +1 -0
  81. package/dist/flatten-object-DFCZmly9.mjs +2 -0
  82. package/dist/flatten-object-DFCZmly9.mjs.map +1 -0
  83. package/dist/{unflatten-object.d.ts → flatten-object-DjaJJaY0.d.cts} +8 -6
  84. package/dist/flatten-object-DjaJJaY0.d.cts.map +1 -0
  85. package/dist/flatten-object.cjs +1 -20
  86. package/dist/flatten-object.d.cts +2 -0
  87. package/dist/flatten-object.d.mts +2 -0
  88. package/dist/flatten-object.mjs +1 -1
  89. package/dist/{get-field.d.ts → get-field-5XqtknPs.d.mts} +25 -22
  90. package/dist/get-field-5XqtknPs.d.mts.map +1 -0
  91. package/dist/get-field-D4F_p-Ov.cjs +1 -0
  92. package/dist/get-field-ngQ9O38X.mjs +2 -0
  93. package/dist/get-field-ngQ9O38X.mjs.map +1 -0
  94. package/dist/get-field-oltWWNRO.d.cts +254 -0
  95. package/dist/get-field-oltWWNRO.d.cts.map +1 -0
  96. package/dist/get-field.cjs +1 -43
  97. package/dist/get-field.d.cts +2 -0
  98. package/dist/get-field.d.mts +2 -0
  99. package/dist/get-field.mjs +1 -1
  100. package/dist/get-object-tag-D53RvMgo.cjs +1 -0
  101. package/dist/get-object-tag-oBoWkttN.mjs +2 -0
  102. package/dist/get-object-tag-oBoWkttN.mjs.map +1 -0
  103. package/dist/{get-ordered-by.d.ts → get-ordered-by-C45FfW2T.d.mts} +5 -2
  104. package/dist/get-ordered-by-C45FfW2T.d.mts.map +1 -0
  105. package/dist/get-ordered-by-CBKKJr4R.mjs +2 -0
  106. package/dist/get-ordered-by-CBKKJr4R.mjs.map +1 -0
  107. package/dist/get-ordered-by-D2Sr6vUN.cjs +1 -0
  108. package/dist/get-ordered-by-DuD7QRma.d.cts +39 -0
  109. package/dist/get-ordered-by-DuD7QRma.d.cts.map +1 -0
  110. package/dist/get-ordered-by.cjs +1 -18
  111. package/dist/get-ordered-by.d.cts +2 -0
  112. package/dist/get-ordered-by.d.mts +2 -0
  113. package/dist/get-ordered-by.mjs +1 -1
  114. package/dist/get-unique-BOiakY6A.cjs +1 -0
  115. package/dist/{get-unique.d.ts → get-unique-C0SBPUBv.d.cts} +6 -2
  116. package/dist/get-unique-C0SBPUBv.d.cts.map +1 -0
  117. package/dist/get-unique-DZ6E1Kvc.d.mts +26 -0
  118. package/dist/get-unique-DZ6E1Kvc.d.mts.map +1 -0
  119. package/dist/get-unique-DzZ7Z34U.mjs +2 -0
  120. package/dist/get-unique-DzZ7Z34U.mjs.map +1 -0
  121. package/dist/get-unique.cjs +1 -17
  122. package/dist/get-unique.d.cts +2 -0
  123. package/dist/get-unique.d.mts +2 -0
  124. package/dist/get-unique.mjs +1 -1
  125. package/dist/{identity.d.ts → identity-B_cGeF8o.d.mts} +5 -1
  126. package/dist/identity-B_cGeF8o.d.mts.map +1 -0
  127. package/dist/identity-DBwwvmGU.mjs +2 -0
  128. package/dist/identity-DBwwvmGU.mjs.map +1 -0
  129. package/dist/identity-DRhIvbPG.d.cts +18 -0
  130. package/dist/identity-DRhIvbPG.d.cts.map +1 -0
  131. package/dist/identity-z2xaIqpe.cjs +1 -0
  132. package/dist/identity.cjs +1 -9
  133. package/dist/identity.d.cts +2 -0
  134. package/dist/identity.d.mts +2 -0
  135. package/dist/identity.mjs +1 -1
  136. package/dist/index.cjs +1 -346
  137. package/dist/index.d.cts +32 -0
  138. package/dist/index.d.mts +32 -0
  139. package/dist/index.mjs +1 -1
  140. package/dist/is-empty-C7vlSVFD.mjs +2 -0
  141. package/dist/is-empty-C7vlSVFD.mjs.map +1 -0
  142. package/dist/is-empty-DZZDqzjD.cjs +1 -0
  143. package/dist/is-equal-0Z-K2uIG.mjs +2 -0
  144. package/dist/is-equal-0Z-K2uIG.mjs.map +1 -0
  145. package/dist/is-equal-BJgVhUVS.cjs +1 -0
  146. package/dist/{is-equal.d.ts → is-equal-BMlMHlVi.d.cts} +5 -1
  147. package/dist/is-equal-BMlMHlVi.d.cts.map +1 -0
  148. package/dist/is-equal-Baqurdpn.d.mts +22 -0
  149. package/dist/is-equal-Baqurdpn.d.mts.map +1 -0
  150. package/dist/is-equal.cjs +1 -61
  151. package/dist/is-equal.d.cts +2 -0
  152. package/dist/is-equal.d.mts +2 -0
  153. package/dist/is-equal.mjs +1 -1
  154. package/dist/is-number-BcjxCzDM.cjs +1 -0
  155. package/dist/is-number-bwhfkHlC.mjs +2 -0
  156. package/dist/is-number-bwhfkHlC.mjs.map +1 -0
  157. package/dist/is-plain-object-BQuFhL4M.cjs +1 -0
  158. package/dist/is-plain-object-D8GSMOhY.mjs +2 -0
  159. package/dist/is-plain-object-D8GSMOhY.mjs.map +1 -0
  160. package/dist/is-set-B9o0NIT4.mjs +2 -0
  161. package/dist/is-set-B9o0NIT4.mjs.map +1 -0
  162. package/dist/is-set-ByJOY6h2.cjs +1 -0
  163. package/dist/is-set-string-48_jZFw0.cjs +1 -0
  164. package/dist/is-set-string-Dr1MlMk0.mjs +2 -0
  165. package/dist/is-set-string-Dr1MlMk0.mjs.map +1 -0
  166. package/dist/is-string-CvmuuuDj.mjs +2 -0
  167. package/dist/is-string-CvmuuuDj.mjs.map +1 -0
  168. package/dist/is-string-DPanLeA_.cjs +1 -0
  169. package/dist/lru-cache-CzQ_kKXk.d.mts +103 -0
  170. package/dist/lru-cache-CzQ_kKXk.d.mts.map +1 -0
  171. package/dist/lru-cache-D4VEIgtR.d.cts +103 -0
  172. package/dist/lru-cache-D4VEIgtR.d.cts.map +1 -0
  173. package/dist/lru-cache-DLY_yZRN.mjs +2 -0
  174. package/dist/lru-cache-DLY_yZRN.mjs.map +1 -0
  175. package/dist/lru-cache-DgTSGx5W.cjs +1 -0
  176. package/dist/lru-cache.cjs +1 -82
  177. package/dist/lru-cache.d.cts +2 -0
  178. package/dist/lru-cache.d.mts +2 -0
  179. package/dist/lru-cache.mjs +1 -1
  180. package/dist/match-sorter-B9_7YvTo.mjs +2 -0
  181. package/dist/match-sorter-B9_7YvTo.mjs.map +1 -0
  182. package/dist/match-sorter-BjnWjkKu.cjs +1 -0
  183. package/dist/{match-sorter.d.ts → match-sorter-CMYN3GuY.d.cts} +44 -43
  184. package/dist/match-sorter-CMYN3GuY.d.cts.map +1 -0
  185. package/dist/match-sorter-DCRerxVe.d.mts +78 -0
  186. package/dist/match-sorter-DCRerxVe.d.mts.map +1 -0
  187. package/dist/match-sorter.cjs +1 -184
  188. package/dist/match-sorter.d.cts +2 -0
  189. package/dist/match-sorter.d.mts +2 -0
  190. package/dist/match-sorter.mjs +1 -1
  191. package/dist/memoize-Cr5jFKxi.mjs +2 -0
  192. package/dist/memoize-Cr5jFKxi.mjs.map +1 -0
  193. package/dist/memoize-TyrmWrfR.d.mts +11 -0
  194. package/dist/memoize-TyrmWrfR.d.mts.map +1 -0
  195. package/dist/memoize-qxvbI-0y.cjs +1 -0
  196. package/dist/memoize-tSTYY522.d.cts +11 -0
  197. package/dist/memoize-tSTYY522.d.cts.map +1 -0
  198. package/dist/memoize.cjs +1 -12
  199. package/dist/memoize.d.cts +2 -0
  200. package/dist/memoize.d.mts +2 -0
  201. package/dist/memoize.mjs +1 -1
  202. package/dist/mutex-CnQQBndt.cjs +1 -0
  203. package/dist/mutex-DAZduiSP.d.mts +72 -0
  204. package/dist/mutex-DAZduiSP.d.mts.map +1 -0
  205. package/dist/mutex-DCyX7B66.d.cts +72 -0
  206. package/dist/mutex-DCyX7B66.d.cts.map +1 -0
  207. package/dist/mutex-TqoKHosg.mjs +2 -0
  208. package/dist/mutex-TqoKHosg.mjs.map +1 -0
  209. package/dist/mutex.cjs +1 -20
  210. package/dist/mutex.d.cts +2 -0
  211. package/dist/mutex.d.mts +2 -0
  212. package/dist/mutex.mjs +1 -1
  213. package/dist/noop-B7OetrhD.mjs +2 -0
  214. package/dist/noop-B7OetrhD.mjs.map +1 -0
  215. package/dist/{noop.d.ts → noop-BnXKMH6Z.d.mts} +6 -2
  216. package/dist/noop-BnXKMH6Z.d.mts.map +1 -0
  217. package/dist/noop-CnJXOCpF.d.cts +22 -0
  218. package/dist/noop-CnJXOCpF.d.cts.map +1 -0
  219. package/dist/noop-Dpf7hIui.cjs +1 -0
  220. package/dist/noop.cjs +1 -10
  221. package/dist/noop.d.cts +2 -0
  222. package/dist/noop.d.mts +2 -0
  223. package/dist/noop.mjs +1 -1
  224. package/dist/object-CHmrmQna.d.mts +160 -0
  225. package/dist/object-CHmrmQna.d.mts.map +1 -0
  226. package/dist/object-D8HGAGMr.d.cts +160 -0
  227. package/dist/object-D8HGAGMr.d.cts.map +1 -0
  228. package/dist/omit-A0uVyAS4.cjs +1 -0
  229. package/dist/omit-BROsDK0D.mjs +2 -0
  230. package/dist/omit-BROsDK0D.mjs.map +1 -0
  231. package/dist/{omit.d.ts → omit-D1FKiOYz.d.cts} +5 -1
  232. package/dist/omit-D1FKiOYz.d.cts.map +1 -0
  233. package/dist/omit-DpqOAtKt.d.mts +22 -0
  234. package/dist/omit-DpqOAtKt.d.mts.map +1 -0
  235. package/dist/omit.cjs +1 -16
  236. package/dist/omit.d.cts +2 -0
  237. package/dist/omit.d.mts +2 -0
  238. package/dist/omit.mjs +1 -1
  239. package/dist/once-DNPPQd3P.d.mts +13 -0
  240. package/dist/once-DNPPQd3P.d.mts.map +1 -0
  241. package/dist/once-DZCwmdkv.cjs +1 -0
  242. package/dist/once-DqmxXwEB.d.cts +13 -0
  243. package/dist/once-DqmxXwEB.d.cts.map +1 -0
  244. package/dist/once-txoW63yJ.mjs +2 -0
  245. package/dist/once-txoW63yJ.mjs.map +1 -0
  246. package/dist/once.cjs +1 -17
  247. package/dist/once.d.cts +2 -0
  248. package/dist/once.d.mts +2 -0
  249. package/dist/once.mjs +1 -1
  250. package/dist/pick-CuXTvXaw.mjs +2 -0
  251. package/dist/pick-CuXTvXaw.mjs.map +1 -0
  252. package/dist/{pick.d.ts → pick-DXREvZBr.d.cts} +5 -1
  253. package/dist/pick-DXREvZBr.d.cts.map +1 -0
  254. package/dist/pick-GDOwAh6I.cjs +1 -0
  255. package/dist/pick-ZrWD4de2.d.mts +22 -0
  256. package/dist/pick-ZrWD4de2.d.mts.map +1 -0
  257. package/dist/pick.cjs +1 -14
  258. package/dist/pick.d.cts +2 -0
  259. package/dist/pick.d.mts +2 -0
  260. package/dist/pick.mjs +1 -1
  261. package/dist/remove-accents-BFmyvTRZ.mjs +2 -0
  262. package/dist/remove-accents-BFmyvTRZ.mjs.map +1 -0
  263. package/dist/remove-accents-C4C0A2ex.d.mts +12 -0
  264. package/dist/remove-accents-C4C0A2ex.d.mts.map +1 -0
  265. package/dist/remove-accents-CXBUC-Id.cjs +1 -0
  266. package/dist/remove-accents-Yo3-2jWO.d.cts +12 -0
  267. package/dist/remove-accents-Yo3-2jWO.d.cts.map +1 -0
  268. package/dist/remove-accents.cjs +1 -411
  269. package/dist/remove-accents.d.cts +2 -0
  270. package/dist/remove-accents.d.mts +2 -0
  271. package/dist/remove-accents.mjs +1 -1
  272. package/dist/remove-empty-items-BglsRCyG.d.cts +11 -0
  273. package/dist/remove-empty-items-BglsRCyG.d.cts.map +1 -0
  274. package/dist/remove-empty-items-BzI9Vid9.mjs +2 -0
  275. package/dist/remove-empty-items-BzI9Vid9.mjs.map +1 -0
  276. package/dist/remove-empty-items-COwdCPHC.d.mts +11 -0
  277. package/dist/remove-empty-items-COwdCPHC.d.mts.map +1 -0
  278. package/dist/remove-empty-items-CjTxJuyS.cjs +1 -0
  279. package/dist/remove-empty-items.cjs +1 -8
  280. package/dist/remove-empty-items.d.cts +2 -0
  281. package/dist/remove-empty-items.d.mts +2 -0
  282. package/dist/remove-empty-items.mjs +1 -1
  283. package/dist/semaphore-4zJqtox8.mjs +2 -0
  284. package/dist/semaphore-4zJqtox8.mjs.map +1 -0
  285. package/dist/semaphore-CsGTxqsW.d.cts +86 -0
  286. package/dist/semaphore-CsGTxqsW.d.cts.map +1 -0
  287. package/dist/semaphore-DkHqPlow.cjs +1 -0
  288. package/dist/semaphore-WaZBtCk5.d.mts +86 -0
  289. package/dist/semaphore-WaZBtCk5.d.mts.map +1 -0
  290. package/dist/semaphore.cjs +1 -32
  291. package/dist/semaphore.d.cts +2 -0
  292. package/dist/semaphore.d.mts +2 -0
  293. package/dist/semaphore.mjs +1 -1
  294. package/dist/set-field-CUgbKEjW.mjs +2 -0
  295. package/dist/set-field-CUgbKEjW.mjs.map +1 -0
  296. package/dist/set-field-CcCiXZNl.d.cts +16 -0
  297. package/dist/set-field-CcCiXZNl.d.cts.map +1 -0
  298. package/dist/set-field-DyvXgpNP.d.mts +16 -0
  299. package/dist/set-field-DyvXgpNP.d.mts.map +1 -0
  300. package/dist/set-field-mr4GkhFb.cjs +1 -0
  301. package/dist/set-field.cjs +1 -21
  302. package/dist/set-field.d.cts +2 -0
  303. package/dist/set-field.d.mts +2 -0
  304. package/dist/set-field.mjs +1 -1
  305. package/dist/throttle-BOKOTo3m.cjs +1 -0
  306. package/dist/{throttle.d.ts → throttle-BWPQuZty.d.cts} +5 -1
  307. package/dist/throttle-BWPQuZty.d.cts.map +1 -0
  308. package/dist/throttle-BgU4k6qs.d.mts +32 -0
  309. package/dist/throttle-BgU4k6qs.d.mts.map +1 -0
  310. package/dist/throttle-CYK3F0mZ.mjs +2 -0
  311. package/dist/throttle-CYK3F0mZ.mjs.map +1 -0
  312. package/dist/throttle.cjs +1 -13
  313. package/dist/throttle.d.cts +2 -0
  314. package/dist/throttle.d.mts +2 -0
  315. package/dist/throttle.mjs +1 -1
  316. package/dist/timeout-43rG9ETK.mjs +2 -0
  317. package/dist/timeout-43rG9ETK.mjs.map +1 -0
  318. package/dist/{timeout.d.ts → timeout-CLhwG-oo.d.mts} +5 -1
  319. package/dist/timeout-CLhwG-oo.d.mts.map +1 -0
  320. package/dist/timeout-CoYbhliP.cjs +1 -0
  321. package/dist/timeout-DC38jHR8.d.cts +12 -0
  322. package/dist/timeout-DC38jHR8.d.cts.map +1 -0
  323. package/dist/timeout.cjs +1 -11
  324. package/dist/timeout.d.cts +2 -0
  325. package/dist/timeout.d.mts +2 -0
  326. package/dist/timeout.mjs +1 -1
  327. package/dist/to-deep-key-Cma9aiEz.cjs +1 -0
  328. package/dist/to-deep-key-D8uDBd6T.mjs +2 -0
  329. package/dist/to-deep-key-D8uDBd6T.mjs.map +1 -0
  330. package/dist/{to-deep-key.d.ts → to-deep-key-DO-Z0Zjs.d.mts} +6 -2
  331. package/dist/to-deep-key-DO-Z0Zjs.d.mts.map +1 -0
  332. package/dist/to-deep-key-DlsE4ziE.d.cts +42 -0
  333. package/dist/to-deep-key-DlsE4ziE.d.cts.map +1 -0
  334. package/dist/to-deep-key.cjs +1 -15
  335. package/dist/to-deep-key.d.cts +2 -0
  336. package/dist/to-deep-key.d.mts +2 -0
  337. package/dist/to-deep-key.mjs +1 -1
  338. package/dist/{to-path.d.ts → to-path-BajxeMmo.d.mts} +5 -1
  339. package/dist/to-path-BajxeMmo.d.mts.map +1 -0
  340. package/dist/to-path-CdOFd4od.cjs +1 -0
  341. package/dist/to-path-D2zWXeYc.d.cts +24 -0
  342. package/dist/to-path-D2zWXeYc.d.cts.map +1 -0
  343. package/dist/to-path-Dm1fe-Ix.mjs +2 -0
  344. package/dist/to-path-Dm1fe-Ix.mjs.map +1 -0
  345. package/dist/to-path.cjs +1 -23
  346. package/dist/to-path.d.cts +2 -0
  347. package/dist/to-path.d.mts +2 -0
  348. package/dist/to-path.mjs +1 -1
  349. package/dist/unflatten-object-C7TE8J80.mjs +2 -0
  350. package/dist/unflatten-object-C7TE8J80.mjs.map +1 -0
  351. package/dist/unflatten-object-CPJIUozj.d.mts +35 -0
  352. package/dist/unflatten-object-CPJIUozj.d.mts.map +1 -0
  353. package/dist/unflatten-object-CvZj41LG.cjs +1 -0
  354. package/dist/unflatten-object-Cvbj7Q__.d.cts +35 -0
  355. package/dist/unflatten-object-Cvbj7Q__.d.cts.map +1 -0
  356. package/dist/unflatten-object.cjs +1 -10
  357. package/dist/unflatten-object.d.cts +2 -0
  358. package/dist/unflatten-object.d.mts +2 -0
  359. package/dist/unflatten-object.mjs +1 -1
  360. package/dist/{union.d.ts → union-BMOMEzO-.d.cts} +5 -1
  361. package/dist/union-BMOMEzO-.d.cts.map +1 -0
  362. package/dist/union-C-2CRoFc.mjs +2 -0
  363. package/dist/union-C-2CRoFc.mjs.map +1 -0
  364. package/dist/union-D4bbjM2i.d.mts +24 -0
  365. package/dist/union-D4bbjM2i.d.mts.map +1 -0
  366. package/dist/union-EwdcZzNT.cjs +1 -0
  367. package/dist/union.cjs +1 -10
  368. package/dist/union.d.cts +2 -0
  369. package/dist/union.d.mts +2 -0
  370. package/dist/union.mjs +1 -1
  371. package/dist/{with-timeout.d.ts → with-timeout-BPaAIZtS.d.cts} +5 -1
  372. package/dist/with-timeout-BPaAIZtS.d.cts.map +1 -0
  373. package/dist/with-timeout-BoZYdcOg.d.mts +24 -0
  374. package/dist/with-timeout-BoZYdcOg.d.mts.map +1 -0
  375. package/dist/with-timeout-CAuUr1ck.mjs +2 -0
  376. package/dist/with-timeout-CAuUr1ck.mjs.map +1 -0
  377. package/dist/with-timeout-CPUBGT4X.cjs +1 -0
  378. package/dist/with-timeout.cjs +1 -10
  379. package/dist/with-timeout.d.cts +2 -0
  380. package/dist/with-timeout.d.mts +2 -0
  381. package/dist/with-timeout.mjs +1 -1
  382. package/package.json +91 -440
  383. package/dist/deep-merge.d.ts +0 -22
  384. package/dist/errors.d.ts +0 -12
  385. package/dist/filter-empty.d.ts +0 -1
  386. package/dist/index.d.ts +0 -31
  387. package/dist/lru-cache.d.ts +0 -99
  388. package/dist/memoize.d.ts +0 -7
  389. package/dist/mutex.d.ts +0 -68
  390. package/dist/once.d.ts +0 -9
  391. package/dist/remove-accents.d.ts +0 -8
  392. package/dist/remove-empty-items.d.ts +0 -7
  393. package/dist/semaphore.d.ts +0 -82
  394. package/dist/set-field.d.ts +0 -10
@@ -0,0 +1,254 @@
1
+ //#region src/get-field.d.ts
2
+ /**
3
+ * See the definition of `@types/lodash`.
4
+ */
5
+ type GetIndexedField<T, K> = K extends keyof T ? T[K] : K extends `${number}` ? "length" extends keyof T ? number extends T["length"] ? number extends keyof T ? T[number] : undefined : undefined : undefined : undefined;
6
+ type FieldWithPossiblyUndefined<T, Key> = GetField<Exclude<T, undefined>, Key> | Extract<T, undefined>;
7
+ type IndexedFieldWithPossiblyUndefined<T, Key> = GetIndexedField<Exclude<T, undefined>, Key> | Extract<T, undefined>;
8
+ type GetField<T, P> = P extends `${infer Left}.${infer Right}` ? Left extends keyof Exclude<T, undefined> ? FieldWithPossiblyUndefined<Exclude<T, undefined>[Left], Right> | Extract<T, undefined> : Left extends `${infer FieldKey}[${infer IndexKey}]` ? FieldKey extends keyof T ? FieldWithPossiblyUndefined<IndexedFieldWithPossiblyUndefined<T[FieldKey], IndexKey>, Right> : undefined : undefined : P extends keyof T ? T[P] : P extends `${infer FieldKey}[${infer IndexKey}]` ? FieldKey extends keyof T ? IndexedFieldWithPossiblyUndefined<T[FieldKey], IndexKey> : undefined : IndexedFieldWithPossiblyUndefined<T, P>;
9
+ /**
10
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
11
+ *
12
+ * @template T - The type of the object.
13
+ * @template K - The type of the key in the object.
14
+ * @template D - The type of the default value.
15
+ *
16
+ * @param {T} object - The object to query.
17
+ * @param {K | [K]} path - The path of the property to get.
18
+ * @returns {T[K]} - Returns the resolved value.
19
+ */
20
+ declare function getField<T extends object, K extends keyof T>(object: T, path: K | readonly [K]): T[K];
21
+ /**
22
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
23
+ *
24
+ * @template T - The type of the object.
25
+ * @template K - The type of the key in the object.
26
+ *
27
+ * @param {T | null | undefined} object - The object to query.
28
+ * @param {K | [K]} path - The path of the property to get.
29
+ * @returns {T[K] | undefined} - Returns the resolved value.
30
+ */
31
+ declare function getField<T extends object, K extends keyof T>(object: T | null | undefined, path: K | readonly [K]): T[K] | undefined;
32
+ /**
33
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
34
+ *
35
+ * @template T - The type of the object.
36
+ * @template K - The type of the key in the object.
37
+ * @template D - The type of the default value.
38
+ *
39
+ * @param {T | null | undefined} object - The object to query.
40
+ * @param {K | [K]} path - The path of the property to get.
41
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
42
+ * @returns {Exclude<T[K], undefined> | D} - Returns the resolved value.
43
+ */
44
+ declare function getField<T extends object, K extends keyof T, D>(object: T | null | undefined, path: K | readonly [K], defaultValue: D): Exclude<T[K], undefined> | D;
45
+ /**
46
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
47
+ *
48
+ * @template T - The type of the object.
49
+ * @template K1 - The type of the first key in the object.
50
+ * @template K2 - The type of the second key in the object.
51
+ *
52
+ * @param {T} object - The object to query.
53
+ * @param {[K1, K2]} path - The path of the property to get.
54
+ * @returns {T[K1][K2]} - Returns the resolved value.
55
+ */
56
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, path: readonly [K1, K2]): T[K1][K2];
57
+ /**
58
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
59
+ *
60
+ * @template T - The type of the object.
61
+ * @template K1 - The type of the first key in the object.
62
+ * @template K2 - The type of the second key in the object.
63
+ *
64
+ * @param {T | null | undefined} object - The object to query.
65
+ * @param {[K1, K2]} path - The path of the property to get.
66
+ * @returns {T[K1][K2] | undefined} - Returns the resolved value.
67
+ */
68
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T | null | undefined, path: readonly [K1, K2]): T[K1][K2] | undefined;
69
+ /**
70
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
71
+ *
72
+ * @template T - The type of the object.
73
+ * @template K1 - The type of the first key in the object.
74
+ * @template K2 - The type of the second key in the object.
75
+ * @template D - The type of the default value.
76
+ *
77
+ * @param {T | null | undefined} object - The object to query.
78
+ * @param {[K1, K2]} path - The path of the property to get.
79
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
80
+ * @returns {Exclude<T[K1][K2], undefined> | D} - Returns the resolved value.
81
+ */
82
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], D>(object: T | null | undefined, path: readonly [K1, K2], defaultValue: D): Exclude<T[K1][K2], undefined> | D;
83
+ /**
84
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
85
+ *
86
+ * @template T - The type of the object.
87
+ * @template K1 - The type of the first key in the object.
88
+ * @template K2 - The type of the second key in the object.
89
+ * @template K3 - The type of the third key in the object.
90
+ *
91
+ * @param {T} object - The object to query.
92
+ * @param {[K1, K2, K3]} path - The path of the property to get.
93
+ * @returns {T[K1][K2][K3]} - Returns the resolved value.
94
+ */
95
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T, path: readonly [K1, K2, K3]): T[K1][K2][K3];
96
+ /**
97
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
98
+ *
99
+ * @template T - The type of the object.
100
+ * @template K1 - The type of the first key in the object.
101
+ * @template K2 - The type of the second key in the object.
102
+ * @template K3 - The type of the third key in the object.
103
+ *
104
+ * @param {T | null | undefined} object - The object to query.
105
+ * @param {[K1, K2, K3]} path - The path of the property to get.
106
+ * @returns {T[K1][K2][K3] | undefined} - Returns the resolved value.
107
+ */
108
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T | null | undefined, path: readonly [K1, K2, K3]): T[K1][K2][K3] | undefined;
109
+ /**
110
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
111
+ *
112
+ * @template T - The type of the object.
113
+ * @template K1 - The type of the first key in the object.
114
+ * @template K2 - The type of the second key in the object.
115
+ * @template K3 - The type of the third key in the object.
116
+ * @template D - The type of the default value.
117
+ *
118
+ * @param {T | null | undefined} object - The object to query.
119
+ * @param {[K1, K2, K3]} path - The path of the property to get.
120
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
121
+ * @returns {Exclude<T[K1][K2][K3], undefined> | D} - Returns the resolved value.
122
+ */
123
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], D>(object: T | null | undefined, path: readonly [K1, K2, K3], defaultValue: D): Exclude<T[K1][K2][K3], undefined> | D;
124
+ /**
125
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
126
+ *
127
+ * @template T - The type of the object.
128
+ * @template K1 - The type of the first key in the object.
129
+ * @template K2 - The type of the second key in the object.
130
+ * @template K3 - The type of the third key in the object.
131
+ * @template K4 - The type of the fourth key in the object.
132
+ *
133
+ * @param {T} object - The object to query.
134
+ * @param {[K1, K2, K3, K4]} path - The path of the property to get.
135
+ * @returns {T[K1][K2][K3][K4]} - Returns the resolved value.
136
+ */
137
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T, path: readonly [K1, K2, K3, K4]): T[K1][K2][K3][K4];
138
+ /**
139
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
140
+ *
141
+ * @template T - The type of the object.
142
+ * @template K1 - The type of the first key in the object.
143
+ * @template K2 - The type of the second key in the object.
144
+ * @template K3 - The type of the third key in the object.
145
+ * @template K4 - The type of the fourth key in the object.
146
+ *
147
+ * @param {T | null | undefined} object - The object to query.
148
+ * @param {[K1, K2, K3, K4]} path - The path of the property to get.
149
+ * @returns {T[K1][K2][K3][K4] | undefined} - Returns the resolved value.
150
+ */
151
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T | null | undefined, path: readonly [K1, K2, K3, K4]): T[K1][K2][K3][K4] | undefined;
152
+ /**
153
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
154
+ *
155
+ * @template T - The type of the object.
156
+ * @template K1 - The type of the first key in the object.
157
+ * @template K2 - The type of the second key in the object.
158
+ * @template K3 - The type of the third key in the object.
159
+ * @template K4 - The type of the fourth key in the object.
160
+ * @template D - The type of the default value.
161
+ *
162
+ * @param {T | null | undefined} object - The object to query.
163
+ * @param {[K1, K2, K3, K4]} path - The path of the property to get.
164
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
165
+ * @returns {Exclude<T[K1][K2][K3][K4], undefined> | D} - Returns the resolved value.
166
+ */
167
+ declare function getField<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3], D>(object: T | null | undefined, path: readonly [K1, K2, K3, K4], defaultValue: D): Exclude<T[K1][K2][K3][K4], undefined> | D;
168
+ /**
169
+ * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.
170
+ *
171
+ * @template T - The type of the value.
172
+ *
173
+ * @param {Record<number, T>} object - The object to query.
174
+ * @param {number} path - The path of the property to get.
175
+ * @returns {T} - Returns the resolved value.
176
+ */
177
+ declare function getField<T>(object: Record<number, T>, path: number): T;
178
+ /**
179
+ * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.
180
+ *
181
+ * @template T - The type of the value.
182
+ *
183
+ * @param {Record<number, T> | null | undefined} object - The object to query.
184
+ * @param {number} path - The path of the property to get.
185
+ * @returns {T | undefined} - Returns the resolved value.
186
+ */
187
+ declare function getField<T>(object: Record<number, T> | null | undefined, path: number): T | undefined;
188
+ /**
189
+ * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.
190
+ *
191
+ * @template T - The type of the value.
192
+ * @template D - The type of the default value.
193
+ *
194
+ * @param {Record<number, T> | null | undefined} object - The object to query.
195
+ * @param {number} path - The path of the property to get.
196
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
197
+ * @returns {T | D} - Returns the resolved value.
198
+ */
199
+ declare function getField<T, D>(object: Record<number, T> | null | undefined, path: number, defaultValue: D): T | D;
200
+ /**
201
+ * Retrieves the value at a given path from a null or undefined object, returning the default value.
202
+ *
203
+ * @template D - The type of the default value.
204
+ *
205
+ * @param {null | undefined} object - The object to query.
206
+ * @param {PropertyKey} path - The path of the property to get.
207
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
208
+ * @returns {D} - Returns the default value.
209
+ */
210
+ declare function getField<D>(object: null | undefined, path: PropertyKey, defaultValue: D): D;
211
+ /**
212
+ * Retrieves the value at a given path from a null or undefined object, returning undefined.
213
+ *
214
+ * @param {null | undefined} object - The object to query.
215
+ * @param {PropertyKey} path - The path of the property to get.
216
+ * @returns {undefined} - Returns undefined.
217
+ */
218
+ declare function getField(object: null | undefined, path: PropertyKey): undefined;
219
+ /**
220
+ * Retrieves the value at a given path from a string-keyed object. If the resolved value is undefined, the defaultValue is returned instead.
221
+ *
222
+ * @template T - The type of the object.
223
+ * @template P - The type of the path.
224
+ *
225
+ * @param {T} data - The object to query.
226
+ * @param {P} path - The path of the property to get.
227
+ * @returns {string extends P ? any : GetField<T, P>} - Returns the resolved value.
228
+ */
229
+ declare function getField<T, P extends string>(data: T, path: P): string extends P ? any : GetField<T, P>;
230
+ /**
231
+ * Retrieves the value at a given path from a string-keyed object. If the resolved value is undefined, the defaultValue is returned instead.
232
+ *
233
+ * @template T - The type of the object.
234
+ * @template P - The type of the path.
235
+ * @template D - The type of the default value.
236
+ *
237
+ * @param {T} data - The object to query.
238
+ * @param {P} path - The path of the property to get.
239
+ * @param {D} defaultValue - The value returned if the resolved value is undefined.
240
+ * @returns {Exclude<GetField<T, P>, null | undefined> | D} - Returns the resolved value.
241
+ */
242
+ declare function getField<T, P extends string, D = GetField<T, P>>(data: T, path: P, defaultValue: D): Exclude<GetField<T, P>, null | undefined> | D;
243
+ /**
244
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
245
+ *
246
+ * @param {unknown} object - The object to query.
247
+ * @param {PropertyKey | readonly PropertyKey[]} path - The path of the property to get.
248
+ * @param {unknown} [defaultValue] - The value returned if the resolved value is undefined.
249
+ * @returns {any} - Returns the resolved value.
250
+ */
251
+ declare function getField(object: unknown, path: PropertyKey | readonly PropertyKey[], defaultValue?: unknown): any;
252
+ //#endregion
253
+ export { getField as n, GetField as t };
254
+ //# sourceMappingURL=get-field-oltWWNRO.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-field-oltWWNRO.d.cts","names":[],"sources":["../src/get-field.ts"],"sourcesContent":[],"mappings":";;;;KAyBK,eAAwC,CAAA,CAAA,EAAA,CAAA,CAAA,GAAhB,CAAgB,SAAA,MAAA,CAAA,GACzC,CADyC,CACvC,CADuC,CAAA,GAEzC,CAFyC,SAAA,GAAA,MAAA,EAAA,GAAA,QAAA,SAAA,MAGhB,CAHgB,GAAA,MAAA,SAItB,CAJsB,CAAA,QAAA,CAAA,GAAA,MAAA,SAAA,MAKd,CALc,GAMjC,CANiC,CAAA,MAAA,CAAA,GAAA,SAAA,GAAA,SAAA,GAAA,SAAA,GAAA,SAAA;KAYxC,0BAXD,CAAA,CAAA,EAAA,GAAA,CAAA,GAYA,QAZA,CAYS,OAZT,CAYiB,CAZjB,EAAA,SAAA,CAAA,EAYgC,GAZhC,CAAA,GAaA,OAbA,CAaQ,CAbR,EA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/Fb,CAAA,EAgGA,OAhGA,CAgGQ,QAhGR,CAgGiB,CAhGjB,EAgGoB,CAhGpB,CAAA,EAAA,IAAA,GAAA,SAAA,CAAA,GAgG4C,CAhG5C;;;AAUH;;;;;AAUA;AACyB,iBAoFT,QAAA,CApFS,MAAA,EAAA,OAAA,EAAA,IAAA,EAsFjB,WAtFiB,GAAA,SAsFM,WAtFN,EAAA,EAAA,YAAA,CAAA,EAAA,OAAA,CAAA,EAAA,GAAA"}
@@ -1,43 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getField = getField;
7
- var _toStringKey = require("@stryke/convert/to-string-key");
8
- var _isDeepKey = require("@stryke/type-checks/is-deep-key");
9
- var _isNumber = require("@stryke/type-checks/is-number");
10
- var _toPath = require("./to-path.cjs");
11
- function getField(t, e, d) {
12
- if (t === null) return d;
13
- switch (typeof e) {
14
- case "string":
15
- {
16
- const n = t[e];
17
- return n === void 0 ? (0, _isDeepKey.isDeepKey)(e) ? getField(t, (0, _toPath.toPath)(e), d) : d : n;
18
- }
19
- case "number":
20
- case "symbol":
21
- {
22
- (0, _isNumber.isNumber)(e) && (e = (0, _toStringKey.toStringKey)(e));
23
- const n = Array.isArray(e) ? void 0 : t[e];
24
- return n === void 0 ? d : n;
25
- }
26
- default:
27
- {
28
- if (Array.isArray(e)) return u(t, e, d);
29
- e = Object.is(e?.valueOf(), -0) ? "-0" : String(e);
30
- const n = t[e];
31
- return n === void 0 ? d : n;
32
- }
33
- }
34
- }
35
- function u(t, e, d) {
36
- if (e.length === 0) return d;
37
- let n = t;
38
- for (const i of e) {
39
- if (n === null) return d;
40
- n = n[i];
41
- }
42
- return n === void 0 ? d : n;
43
- }
1
+ const e=require(`./get-field-D4F_p-Ov.cjs`);require(`./to-path-CdOFd4od.cjs`),exports.getField=e.t;
@@ -0,0 +1,2 @@
1
+ import { n as getField, t as GetField } from "./get-field-oltWWNRO.cjs";
2
+ export { GetField, getField };
@@ -0,0 +1,2 @@
1
+ import { n as getField, t as GetField } from "./get-field-5XqtknPs.mjs";
2
+ export { GetField, getField };
@@ -1 +1 @@
1
- import{toStringKey as o}from"@stryke/convert/to-string-key";import{isDeepKey as K}from"@stryke/type-checks/is-deep-key";import{isNumber as f}from"@stryke/type-checks/is-number";import{toPath as r}from"./to-path";export function getField(t,e,d){if(t===null)return d;switch(typeof e){case"string":{const n=t[e];return n===void 0?K(e)?getField(t,r(e),d):d:n}case"number":case"symbol":{f(e)&&(e=o(e));const n=Array.isArray(e)?void 0:t[e];return n===void 0?d:n}default:{if(Array.isArray(e))return u(t,e,d);e=Object.is(e?.valueOf(),-0)?"-0":String(e);const n=t[e];return n===void 0?d:n}}}function u(t,e,d){if(e.length===0)return d;let n=t;for(const i of e){if(n===null)return d;n=n[i]}return n===void 0?d:n}
1
+ import{t as e}from"./get-field-ngQ9O38X.mjs";import"./to-path-Dm1fe-Ix.mjs";export{e as getField};
@@ -0,0 +1 @@
1
+ const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -0,0 +1,2 @@
1
+ const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e);export{e as t};
2
+ //# sourceMappingURL=get-object-tag-oBoWkttN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-object-tag-oBoWkttN.mjs","names":[],"sources":["../../type-checks/src/get-object-tag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n"],"mappings":"AAwBA,MAAa,EAAgB,GACvB,GAAS,KACJ,IAAU,IAAA,GAAY,qBAAuB,gBAE/C,OAAO,UAAU,SAAS,KAAK,EAAM"}
@@ -1,3 +1,4 @@
1
+ //#region src/get-ordered-by.d.ts
1
2
  type Order = "asc" | "desc";
2
3
  /**
3
4
  * Sorts an array of objects based on multiple properties and their corresponding order directions.
@@ -32,5 +33,7 @@ type Order = "asc" | "desc";
32
33
  * @param orders - An array of order directions ('asc' for ascending or 'desc' for descending).
33
34
  * @returns The sorted array.
34
35
  */
35
- export declare function getOrderedBy<T>(collection: T[], keys: (keyof T)[], orders: Order[]): T[];
36
- export {};
36
+ declare function getOrderedBy<T>(collection: T[], keys: (keyof T)[], orders: Order[]): T[];
37
+ //#endregion
38
+ export { getOrderedBy as t };
39
+ //# sourceMappingURL=get-ordered-by-C45FfW2T.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-ordered-by-C45FfW2T.d.mts","names":[],"sources":["../src/get-ordered-by.ts"],"sourcesContent":[],"mappings":";KAiBK,KAAA;;AAmCL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,4BACF,kBACC,cACL,UACP"}
@@ -0,0 +1,2 @@
1
+ function e(e,t,n){let r=(e,t,n)=>e<t?n===`asc`?-1:1:e>t?n===`asc`?1:-1:0,i=t.map((e,t)=>n[t]??n.at(-1));return[...e].sort((e,n)=>{for(let[a,o]of t.entries()){let t=i[a],s=r(e[o],n[o],t);if(s!==0)return s}return 0})}export{e as t};
2
+ //# sourceMappingURL=get-ordered-by-CBKKJr4R.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-ordered-by-CBKKJr4R.mjs","names":[],"sources":["../src/get-ordered-by.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\ntype Order = \"asc\" | \"desc\";\n\n/**\n * Sorts an array of objects based on multiple properties and their corresponding order directions.\n *\n * @remarks\n * This function takes an array of objects, an array of keys to sort by, and an array of order directions.\n * It returns the sorted array, ordering by each key according to its corresponding direction\n * ('asc' for ascending or 'desc' for descending). If values for a key are equal,\n * it moves to the next key to determine the order.\n *\n * @example\n * ```typescript\n * // Sort an array of objects by 'user' in ascending order and 'age' in descending order.\n * const users = [\n * { user: 'fred', age: 48 },\n * { user: 'barney', age: 34 },\n * { user: 'fred', age: 40 },\n * { user: 'barney', age: 36 },\n * ];\n * const result = orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // result will be:\n * // [\n * // { user: 'barney', age: 36 },\n * // { user: 'barney', age: 34 },\n * // { user: 'fred', age: 48 },\n * // { user: 'fred', age: 40 },\n * // ]\n * ```\n *\n * @param collection - The array of objects to be sorted.\n * @param keys - An array of keys (properties) by which to sort.\n * @param orders - An array of order directions ('asc' for ascending or 'desc' for descending).\n * @returns The sorted array.\n */\nexport function getOrderedBy<T>(\n collection: T[],\n keys: (keyof T)[],\n orders: Order[]\n): T[] {\n const compareValues = (a: T[keyof T], b: T[keyof T], order: Order) => {\n if (a < b) {\n return order === \"asc\" ? -1 : 1;\n }\n if (a > b) {\n return order === \"asc\" ? 1 : -1;\n }\n return 0;\n };\n\n const effectiveOrders = keys.map(\n (_, index) => orders[index] ?? orders.at(-1)\n );\n\n return [...collection].sort((a, b) => {\n for (const [i, key] of keys.entries()) {\n const order = effectiveOrders[i];\n const result = compareValues(a[key], b[key], order!);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n}\n"],"mappings":"AAoDA,SAAgB,EACd,EACA,EACA,EACK,CACL,IAAM,GAAiB,EAAe,EAAe,IAC/C,EAAI,EACC,IAAU,MAAQ,GAAK,EAE5B,EAAI,EACC,IAAU,MAAQ,EAAI,GAExB,EAGH,EAAkB,EAAK,KAC1B,EAAG,IAAU,EAAO,IAAU,EAAO,GAAG,GAAG,CAC7C,CAED,MAAO,CAAC,GAAG,EAAW,CAAC,MAAM,EAAG,IAAM,CACpC,IAAK,GAAM,CAAC,EAAG,KAAQ,EAAK,SAAS,CAAE,CACrC,IAAM,EAAQ,EAAgB,GACxB,EAAS,EAAc,EAAE,GAAM,EAAE,GAAM,EAAO,CACpD,GAAI,IAAW,EACb,OAAO,EAGX,MAAO,IACP"}
@@ -0,0 +1 @@
1
+ function e(e,t,n){let r=(e,t,n)=>e<t?n===`asc`?-1:1:e>t?n===`asc`?1:-1:0,i=t.map((e,t)=>n[t]??n.at(-1));return[...e].sort((e,n)=>{for(let[a,o]of t.entries()){let t=i[a],s=r(e[o],n[o],t);if(s!==0)return s}return 0})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -0,0 +1,39 @@
1
+ //#region src/get-ordered-by.d.ts
2
+ type Order = "asc" | "desc";
3
+ /**
4
+ * Sorts an array of objects based on multiple properties and their corresponding order directions.
5
+ *
6
+ * @remarks
7
+ * This function takes an array of objects, an array of keys to sort by, and an array of order directions.
8
+ * It returns the sorted array, ordering by each key according to its corresponding direction
9
+ * ('asc' for ascending or 'desc' for descending). If values for a key are equal,
10
+ * it moves to the next key to determine the order.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * // Sort an array of objects by 'user' in ascending order and 'age' in descending order.
15
+ * const users = [
16
+ * { user: 'fred', age: 48 },
17
+ * { user: 'barney', age: 34 },
18
+ * { user: 'fred', age: 40 },
19
+ * { user: 'barney', age: 36 },
20
+ * ];
21
+ * const result = orderBy(users, ['user', 'age'], ['asc', 'desc']);
22
+ * // result will be:
23
+ * // [
24
+ * // { user: 'barney', age: 36 },
25
+ * // { user: 'barney', age: 34 },
26
+ * // { user: 'fred', age: 48 },
27
+ * // { user: 'fred', age: 40 },
28
+ * // ]
29
+ * ```
30
+ *
31
+ * @param collection - The array of objects to be sorted.
32
+ * @param keys - An array of keys (properties) by which to sort.
33
+ * @param orders - An array of order directions ('asc' for ascending or 'desc' for descending).
34
+ * @returns The sorted array.
35
+ */
36
+ declare function getOrderedBy<T>(collection: T[], keys: (keyof T)[], orders: Order[]): T[];
37
+ //#endregion
38
+ export { getOrderedBy as t };
39
+ //# sourceMappingURL=get-ordered-by-DuD7QRma.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-ordered-by-DuD7QRma.d.cts","names":[],"sources":["../src/get-ordered-by.ts"],"sourcesContent":[],"mappings":";KAiBK,KAAA;;AAmCL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,4BACF,kBACC,cACL,UACP"}
@@ -1,18 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getOrderedBy = getOrderedBy;
7
- function getOrderedBy(f, n, o) {
8
- const u = (r, e, t) => r < e ? t === "asc" ? -1 : 1 : r > e ? t === "asc" ? 1 : -1 : 0,
9
- T = n.map((r, e) => o[e] ?? o.at(-1));
10
- return [...f].sort((r, e) => {
11
- for (const [t, c] of n.entries()) {
12
- const i = T[t],
13
- s = u(r[c], e[c], i);
14
- if (s !== 0) return s;
15
- }
16
- return 0;
17
- });
18
- }
1
+ const e=require(`./get-ordered-by-D2Sr6vUN.cjs`);exports.getOrderedBy=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as getOrderedBy } from "./get-ordered-by-DuD7QRma.cjs";
2
+ export { getOrderedBy };
@@ -0,0 +1,2 @@
1
+ import { t as getOrderedBy } from "./get-ordered-by-C45FfW2T.mjs";
2
+ export { getOrderedBy };
@@ -1 +1 @@
1
- export function getOrderedBy(f,n,o){const u=(r,e,t)=>r<e?t==="asc"?-1:1:r>e?t==="asc"?1:-1:0,T=n.map((r,e)=>o[e]??o.at(-1));return[...f].sort((r,e)=>{for(const[t,c]of n.entries()){const i=T[t],s=u(r[c],e[c],i);if(s!==0)return s}return 0})}
1
+ import{t as e}from"./get-ordered-by-CBKKJr4R.mjs";export{e as getOrderedBy};
@@ -0,0 +1 @@
1
+ const e=e=>[...new Set(e)];function t(e,t=e=>e){let n=new Map;for(let r of e){let e=t(r);n.has(e)||n.set(e,r)}return[...n.values()]}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,10 +1,11 @@
1
+ //#region src/get-unique.d.ts
1
2
  /**
2
3
  * Returns an array of unique values from the given array.
3
4
  *
4
5
  * @param arr - The array to get unique values from.
5
6
  * @returns An array of unique values.
6
7
  */
7
- export declare const getUnique: <T = any>(arr: T[]) => T[];
8
+ declare const getUnique: <T = any>(arr: T[]) => T[];
8
9
  /**
9
10
  * Returns a new array containing only the unique elements from the original array,
10
11
  * based on the values returned by the mapper function.
@@ -19,4 +20,7 @@ export declare const getUnique: <T = any>(arr: T[]) => T[];
19
20
  * @param mapper - The function used to convert the array elements.
20
21
  * @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function.
21
22
  */
22
- export declare function getUniqueBy<T, U>(arr: readonly T[], mapper?: (item: T) => U): T[];
23
+ declare function getUniqueBy<T, U>(arr: readonly T[], mapper?: (item: T) => U): T[];
24
+ //#endregion
25
+ export { getUniqueBy as n, getUnique as t };
26
+ //# sourceMappingURL=get-unique-C0SBPUBv.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-unique-C0SBPUBv.d.cts","names":[],"sources":["../src/get-unique.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAkBA;;;;AAGG,cArBU,SAqBV,EAAA,CAAA,IAAA,GAAA,CAAA,CAAA,GAAA,EArBqC,CAqBrC,EAAA,EAAA,GArB2C,CAqB3C,EAAA;;;;;;;;;;;;;;;iBAHa,gCACA,qBACC,MAAM,IACpB"}
@@ -0,0 +1,26 @@
1
+ //#region src/get-unique.d.ts
2
+ /**
3
+ * Returns an array of unique values from the given array.
4
+ *
5
+ * @param arr - The array to get unique values from.
6
+ * @returns An array of unique values.
7
+ */
8
+ declare const getUnique: <T = any>(arr: T[]) => T[];
9
+ /**
10
+ * Returns a new array containing only the unique elements from the original array,
11
+ * based on the values returned by the mapper function.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor);
16
+ * // [1.2, 2.1, 3.2, 5.7, 7.19]
17
+ * ```
18
+ *
19
+ * @param arr - The array to process.
20
+ * @param mapper - The function used to convert the array elements.
21
+ * @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function.
22
+ */
23
+ declare function getUniqueBy<T, U>(arr: readonly T[], mapper?: (item: T) => U): T[];
24
+ //#endregion
25
+ export { getUniqueBy as n, getUnique as t };
26
+ //# sourceMappingURL=get-unique-DZ6E1Kvc.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-unique-DZ6E1Kvc.d.mts","names":[],"sources":["../src/get-unique.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAkBA;;;;AAGG,cArBU,SAqBV,EAAA,CAAA,IAAA,GAAA,CAAA,CAAA,GAAA,EArBqC,CAqBrC,EAAA,EAAA,GArB2C,CAqB3C,EAAA;;;;;;;;;;;;;;;iBAHa,gCACA,qBACC,MAAM,IACpB"}
@@ -0,0 +1,2 @@
1
+ const e=e=>[...new Set(e)];function t(e,t=e=>e){let n=new Map;for(let r of e){let e=t(r);n.has(e)||n.set(e,r)}return[...n.values()]}export{t as n,e as t};
2
+ //# sourceMappingURL=get-unique-DzZ7Z34U.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-unique-DzZ7Z34U.mjs","names":[],"sources":["../src/get-unique.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Returns an array of unique values from the given array.\n *\n * @param arr - The array to get unique values from.\n * @returns An array of unique values.\n */\nexport const getUnique = <T = any>(arr: T[]): T[] => {\n return [...new Set(arr)];\n};\n\n/**\n * Returns a new array containing only the unique elements from the original array,\n * based on the values returned by the mapper function.\n *\n * @example\n * ```ts\n * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor);\n * // [1.2, 2.1, 3.2, 5.7, 7.19]\n * ```\n *\n * @param arr - The array to process.\n * @param mapper - The function used to convert the array elements.\n * @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function.\n */\nexport function getUniqueBy<T, U>(\n arr: readonly T[],\n mapper: (item: T) => U = item => item as unknown as U\n): T[] {\n const map = new Map<U, T>();\n\n for (const item of arr) {\n const key = mapper(item);\n\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return [...map.values()];\n}\n"],"mappings":"AAwBA,MAAa,EAAsB,GAC1B,CAAC,GAAG,IAAI,IAAI,EAAI,CAAC,CAiB1B,SAAgB,EACd,EACA,EAAyB,GAAQ,EAC5B,CACL,IAAM,EAAM,IAAI,IAEhB,IAAK,IAAM,KAAQ,EAAK,CACtB,IAAM,EAAM,EAAO,EAAK,CAEnB,EAAI,IAAI,EAAI,EACf,EAAI,IAAI,EAAK,EAAK,CAItB,MAAO,CAAC,GAAG,EAAI,QAAQ,CAAC"}
@@ -1,17 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getUnique = void 0;
7
- exports.getUniqueBy = getUniqueBy;
8
- const getUnique = n => [...new Set(n)];
9
- exports.getUnique = getUnique;
10
- function getUniqueBy(n, s = e => e) {
11
- const e = new Map();
12
- for (const t of n) {
13
- const o = s(t);
14
- e.has(o) || e.set(o, t);
15
- }
16
- return [...e.values()];
17
- }
1
+ const e=require(`./get-unique-BOiakY6A.cjs`);exports.getUnique=e.t,exports.getUniqueBy=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as getUniqueBy, t as getUnique } from "./get-unique-C0SBPUBv.cjs";
2
+ export { getUnique, getUniqueBy };
@@ -0,0 +1,2 @@
1
+ import { n as getUniqueBy, t as getUnique } from "./get-unique-DZ6E1Kvc.mjs";
2
+ export { getUnique, getUniqueBy };
@@ -1 +1 @@
1
- export const getUnique=n=>[...new Set(n)];export function getUniqueBy(n,s=e=>e){const e=new Map;for(const t of n){const o=s(t);e.has(o)||e.set(o,t)}return[...e.values()]}
1
+ import{n as e,t}from"./get-unique-DzZ7Z34U.mjs";export{t as getUnique,e as getUniqueBy};
@@ -1,3 +1,4 @@
1
+ //#region src/identity.d.ts
1
2
  /**
2
3
  * Returns the input value unchanged.
3
4
  *
@@ -11,4 +12,7 @@
11
12
  * @param x - The value to be returned.
12
13
  * @returns The input value.
13
14
  */
14
- export declare function identity<T>(x: T): T;
15
+ declare function identity<T>(x: T): T;
16
+ //#endregion
17
+ export { identity as t };
18
+ //# sourceMappingURL=identity-B_cGeF8o.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-B_cGeF8o.d.mts","names":[],"sources":["../src/identity.ts"],"sourcesContent":[],"mappings":";;AA8BA;;;;;;;;;;;;iBAAgB,eAAe,IAAI"}
@@ -0,0 +1,2 @@
1
+ function e(e){return e}export{e as t};
2
+ //# sourceMappingURL=identity-DBwwvmGU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-DBwwvmGU.mjs","names":[],"sources":["../src/identity.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://stormsoftware.com/projects/stryke/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/stryke/license\n\n ------------------------------------------------------------------- */\n\n/**\n * Returns the input value unchanged.\n *\n * @example\n * ```ts\n * identity(5); // Returns 5\n * identity('hello'); // Returns 'hello'\n * identity({ key: 'value' }); // Returns { key: 'value' }\n * ```\n *\n * @param x - The value to be returned.\n * @returns The input value.\n */\nexport function identity<T>(x: T): T {\n return x;\n}\n"],"mappings":"AA8BA,SAAgB,EAAY,EAAS,CACnC,OAAO"}
@@ -0,0 +1,18 @@
1
+ //#region src/identity.d.ts
2
+ /**
3
+ * Returns the input value unchanged.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * identity(5); // Returns 5
8
+ * identity('hello'); // Returns 'hello'
9
+ * identity({ key: 'value' }); // Returns { key: 'value' }
10
+ * ```
11
+ *
12
+ * @param x - The value to be returned.
13
+ * @returns The input value.
14
+ */
15
+ declare function identity<T>(x: T): T;
16
+ //#endregion
17
+ export { identity as t };
18
+ //# sourceMappingURL=identity-DRhIvbPG.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-DRhIvbPG.d.cts","names":[],"sources":["../src/identity.ts"],"sourcesContent":[],"mappings":";;AA8BA;;;;;;;;;;;;iBAAgB,eAAe,IAAI"}
@@ -0,0 +1 @@
1
+ function e(e){return e}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
package/dist/identity.cjs CHANGED
@@ -1,9 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.identity = identity;
7
- function identity(t) {
8
- return t;
9
- }
1
+ const e=require(`./identity-z2xaIqpe.cjs`);exports.identity=e.t;