@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,78 @@
1
+ //#region src/match-sorter.d.ts
2
+ /**
3
+ * Forked from match-sorter by Kent C. Dodds
4
+ */
5
+ interface KeyAttributes {
6
+ threshold?: Ranking;
7
+ maxRanking: Ranking;
8
+ minRanking: Ranking;
9
+ }
10
+ interface RankingInfo {
11
+ rankedValue: string;
12
+ rank: Ranking;
13
+ keyIndex: number;
14
+ keyThreshold: Ranking | undefined;
15
+ }
16
+ interface ValueGetterKey<ItemType> {
17
+ (item: ItemType): string | Array<string>;
18
+ }
19
+ interface IndexedItem<ItemType> {
20
+ item: ItemType;
21
+ index: number;
22
+ }
23
+ interface RankedItem<ItemType> extends RankingInfo, IndexedItem<ItemType> {}
24
+ interface BaseSorter<ItemType> {
25
+ (a: RankedItem<ItemType>, b: RankedItem<ItemType>): number;
26
+ }
27
+ interface Sorter<ItemType> {
28
+ (matchItems: Array<RankedItem<ItemType>>): Array<RankedItem<ItemType>>;
29
+ }
30
+ interface KeyAttributesOptions<ItemType> {
31
+ key?: string | ValueGetterKey<ItemType>;
32
+ threshold?: Ranking;
33
+ maxRanking?: Ranking;
34
+ minRanking?: Ranking;
35
+ }
36
+ type KeyOption<ItemType> = KeyAttributesOptions<ItemType> | ValueGetterKey<ItemType> | string;
37
+ interface MatchSorterOptions<ItemType = unknown> {
38
+ keys?: ReadonlyArray<KeyOption<ItemType>>;
39
+ threshold?: Ranking;
40
+ baseSort?: BaseSorter<ItemType>;
41
+ keepDiacritics?: boolean;
42
+ sorter?: Sorter<ItemType>;
43
+ }
44
+ declare const rankings: {
45
+ readonly CASE_SENSITIVE_EQUAL: 7;
46
+ readonly EQUAL: 6;
47
+ readonly STARTS_WITH: 5;
48
+ readonly WORD_STARTS_WITH: 4;
49
+ readonly CONTAINS: 3;
50
+ readonly ACRONYM: 2;
51
+ readonly MATCHES: 1;
52
+ readonly NO_MATCH: 0;
53
+ };
54
+ type Ranking = (typeof rankings)[keyof typeof rankings];
55
+ declare const defaultBaseSortFn: BaseSorter<unknown>;
56
+ /**
57
+ * Takes an array of items and a value and returns a new array with the items that match the given value
58
+ * @param items - the items to sort
59
+ * @param value - the value to use for ranking
60
+ * @param options - Some options to configure the sorter
61
+ * @returns - the new sorted array
62
+ */
63
+ declare function matchSorter<ItemType = string>(items: ReadonlyArray<ItemType>, value: string, options?: MatchSorterOptions<ItemType>): Array<ItemType>;
64
+ declare namespace matchSorter {
65
+ var rankings: {
66
+ readonly CASE_SENSITIVE_EQUAL: 7;
67
+ readonly EQUAL: 6;
68
+ readonly STARTS_WITH: 5;
69
+ readonly WORD_STARTS_WITH: 4;
70
+ readonly CONTAINS: 3;
71
+ readonly ACRONYM: 2;
72
+ readonly MATCHES: 1;
73
+ readonly NO_MATCH: 0;
74
+ };
75
+ }
76
+ //#endregion
77
+ export { RankingInfo as a, matchSorter as c, MatchSorterOptions as i, rankings as l, KeyAttributesOptions as n, ValueGetterKey as o, KeyOption as r, defaultBaseSortFn as s, KeyAttributes as t };
78
+ //# sourceMappingURL=match-sorter-DCRerxVe.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match-sorter-DCRerxVe.d.mts","names":[],"sources":["../src/match-sorter.ts"],"sourcesContent":[],"mappings":";;;;UAyBU,aAAA,CAEI;EACA,SAAA,CAAA,EAFA,OAEA;EAAO,UAAA,EADP,OACO;EAEX,UAAA,EAFI,OAEO;AAIE;AAIW,UARxB,WAAA,CAUW;EAIX,WAAA,EAAU,MAAA;EAA4C,IAAA,EAZxD,OAYwD;EAAzB,QAAA,EAAA,MAAA;EAAa,YAAA,EAVpC,OAUoC,GAAA,SAAA;;AAAW,UAPrD,cASU,CAAA,QAAA,CAAA,CAAA;EACH,CAAA,IAAA,EATR,QASQ,CAAA,EAAA,MAAA,GATY,KASZ,CAAA,MAAA,CAAA;;UAPP,WAOgC,CAAA,QAAA,CAAA,CAAA;EAAX,IAAA,EANvB,QAMuB;EAAU,KAAA,EAAA,MAAA;AAAA;UAH/B,UAOsB,CAAA,QAAA,CAAA,SAPO,WAOP,EAPoB,WAOpB,CAPgC,QAOhC,CAAA,CAAA;UALtB,UAKK,CAAA,QAAA,CAAA,CAAA;EAA+C,CAAA,CAAA,EAJxD,UAIwD,CAJ7C,QAI6C,CAAA,EAAA,CAAA,EAJ/B,UAI+B,CAJpB,QAIoB,CAAA,CAAA,EAAA,MAAA;;UADpD,MACmC,CAAA,QAAA,CAAA,CAAA;EAAK,CAAA,UAAA,EAAnC,KAAmC,CAA7B,UAA6B,CAAlB,QAAkB,CAAA,CAAA,CAAA,EAAL,KAAK,CAAC,UAAD,CAAY,QAAZ,CAAA,CAAA;AAAA;UAGxC,oBACsB,CAAA,QAAA,CAAA,CAAA;EAAf,GAAA,CAAA,EAAA,MAAA,GAAA,cAAA,CAAe,QAAf,CAAA;EACH,SAAA,CAAA,EAAA,OAAA;EACC,UAAA,CAAA,EAAA,OAAA;EACA,UAAA,CAAA,EAAA,OAAA;;AAAO,KAGjB,SAAA,CAAA,QAAS,CAAA,GACV,oBADU,CACW,QADX,CAAA,GAEV,cAFU,CAEK,QAFL,CAAA,GAAA,MAAA;UAKJ,kBAJe,CAAA,WAAA,OAAA,CAAA,CAAA;EAArB,IAAA,CAAA,EAKK,aALL,CAKmB,SALnB,CAK6B,QAL7B,CAAA,CAAA;EACe,SAAA,CAAA,EAKL,OALK;EAAf,QAAA,CAAA,EAMS,UANT,CAMoB,QANpB,CAAA;EAAc,cAAA,CAAA,EAAA,OAAA;EAGR,MAAA,CAAA,EAKC,MALD,CAKQ,QALU,CAAA;;cAStB,QARiB,EAAA;EAAd,SAAA,oBAAA,EAAA,CAAA;EACK,SAAA,KAAA,EAAA,CAAA;EACU,SAAA,WAAA,EAAA,CAAA;EAAX,SAAA,gBAAA,EAAA,CAAA;EAEK,SAAA,QAAA,EAAA,CAAA;EAAP,SAAA,OAAA,EAAA,CAAA;EAAM,SAAA,OAAA,EAAA,CAAA;EAIX,SAAA,QASI,EAAA,CAAA;AAAA,CAAA;AAE4C,KAAjD,OAAA,GAEC,CAAA,OAFiB,QAGqC,CAAA,CAAA,MADnC,OAFqB,QAEX,CAAA;AAAA,cAA7B,iBAUc,EAVK,UAUL,CAAA,OAAA,CAAA;;;;;;;;AAIZ,iBAJC,WAAW,CAAA,WAAA,MAAA,CAAA,CAAA,KAAA,EACX,aADW,CACG,QADH,CAAA,EAAA,KAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAGT,kBAHS,CAGU,QAHV,CAAA,CAAA,EAIjB,KAJiB,CAIX,QAJW,CAAA;kBAAX,WAAA"}
@@ -1,184 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.defaultBaseSortFn = void 0;
7
- exports.matchSorter = T;
8
- exports.rankings = void 0;
9
- var _removeAccents = require("./remove-accents.cjs");
10
- const I = exports.rankings = {
11
- CASE_SENSITIVE_EQUAL: 7,
12
- EQUAL: 6,
13
- STARTS_WITH: 5,
14
- WORD_STARTS_WITH: 4,
15
- CONTAINS: 3,
16
- ACRONYM: 2,
17
- MATCHES: 1,
18
- NO_MATCH: 0
19
- },
20
- g = (n, e) => String(n.rankedValue).localeCompare(String(e.rankedValue));
21
- exports.defaultBaseSortFn = g;
22
- function T(n, e, t = {}) {
23
- const {
24
- keys: r,
25
- threshold: c = I.MATCHES,
26
- baseSort: s = g,
27
- sorter: y = i => i.sort((o, l) => V(o, l, s))
28
- } = t,
29
- u = n.reduce((i, o, l) => a(i, o, l), []);
30
- return y(u).map(({
31
- item: i
32
- }) => i);
33
- function a(i, o, l) {
34
- const m = O(o, r, e, t),
35
- {
36
- rank: p,
37
- keyThreshold: f = c
38
- } = m;
39
- return p >= f && i.push({
40
- ...m,
41
- item: o,
42
- index: l
43
- }), i;
44
- }
45
- }
46
- T.rankings = I;
47
- function O(n, e, t, r) {
48
- if (!e) {
49
- const s = n;
50
- return {
51
- rankedValue: s,
52
- rank: k(s, t, r),
53
- keyIndex: -1,
54
- keyThreshold: r.threshold
55
- };
56
- }
57
- return M(n, e).reduce(({
58
- rank: s,
59
- rankedValue: y,
60
- keyIndex: u,
61
- keyThreshold: a
62
- }, {
63
- itemValue: i,
64
- attributes: o
65
- }, l) => {
66
- let m = k(i, t, r),
67
- p = y;
68
- const {
69
- minRanking: f,
70
- maxRanking: d,
71
- threshold: R
72
- } = o;
73
- return m < f && m >= I.MATCHES ? m = f : m > d && (m = d), m > s && (s = m, u = l, a = R, p = i), {
74
- rankedValue: p,
75
- rank: s,
76
- keyIndex: u,
77
- keyThreshold: a
78
- };
79
- }, {
80
- rankedValue: n,
81
- rank: I.NO_MATCH,
82
- keyIndex: -1,
83
- keyThreshold: r.threshold
84
- });
85
- }
86
- function k(n, e, t) {
87
- return n = A(n, t), e = A(e, t), e.length > n.length ? I.NO_MATCH : n === e ? I.CASE_SENSITIVE_EQUAL : (n = n.toLowerCase(), e = e.toLowerCase(), n === e ? I.EQUAL : n.startsWith(e) ? I.STARTS_WITH : n.includes(` ${e}`) ? I.WORD_STARTS_WITH : n.includes(e) ? I.CONTAINS : e.length === 1 ? I.NO_MATCH : S(n).includes(e) ? I.ACRONYM : C(n, e));
88
- }
89
- function S(n) {
90
- let e = "";
91
- const t = n.split(" ");
92
- for (const r of t) {
93
- const c = r.split("-");
94
- for (const s of c) e += s.slice(0, 1);
95
- }
96
- return e;
97
- }
98
- function C(n, e) {
99
- let t = 0,
100
- r = 0;
101
- function c(a, i, o) {
102
- for (let l = o, m = i.length; l < m; l++) if (i[l] === a) return t += 1, l + 1;
103
- return -1;
104
- }
105
- function s(a) {
106
- const i = 1 / a,
107
- o = t / e.length;
108
- return I.MATCHES + o * i;
109
- }
110
- const y = c(e[0], n, 0);
111
- if (y < 0) return I.NO_MATCH;
112
- r = y;
113
- for (let a = 1, i = e.length; a < i; a++) {
114
- const o = e[a];
115
- if (r = c(o, n, r), !(r > -1)) return I.NO_MATCH;
116
- }
117
- const u = r - y;
118
- return s(u);
119
- }
120
- function V(n, e, t) {
121
- const {
122
- rank: s,
123
- keyIndex: y
124
- } = n,
125
- {
126
- rank: u,
127
- keyIndex: a
128
- } = e;
129
- return s === u ? y === a ? t(n, e) : y < a ? -1 : 1 : s > u ? -1 : 1;
130
- }
131
- function A(n, {
132
- keepDiacritics: e
133
- }) {
134
- return n = `${n}`, e || (n = (0, _removeAccents.removeAccents)(n)), n;
135
- }
136
- function K(n, e) {
137
- typeof e == "object" && (e = e.key);
138
- let t;
139
- if (typeof e == "function") t = e(n);else if (n === null) t = null;else if (Object.hasOwnProperty.call(n, e)) t = n[e];else {
140
- if (e.includes(".")) return x(e, n);
141
- t = null;
142
- }
143
- return t === null ? [] : Array.isArray(t) ? t : [String(t)];
144
- }
145
- function x(n, e) {
146
- const t = n.split(".");
147
- let r = [e];
148
- for (let c = 0, s = t.length; c < s; c++) {
149
- const y = t[c];
150
- let u = [];
151
- for (let a = 0, i = r.length; a < i; a++) {
152
- const o = r[a];
153
- if (o !== null) if (y && Object.hasOwnProperty.call(o, y)) {
154
- const l = o[y];
155
- l !== null && u.push(l);
156
- } else o && y === "*" && (u = [...u, o]);
157
- }
158
- r = u;
159
- }
160
- return Array.isArray(r[0]) ? [].concat(...r) : r;
161
- }
162
- function M(n, e) {
163
- const t = [];
164
- for (let r = 0, c = e.length; r < c; r++) {
165
- const s = e[r],
166
- y = H(s),
167
- u = K(n, s);
168
- for (let a = 0, i = u.length; a < i; a++) t.push({
169
- itemValue: u[a],
170
- attributes: y
171
- });
172
- }
173
- return t;
174
- }
175
- const h = {
176
- maxRanking: 1 / 0,
177
- minRanking: -1 / 0
178
- };
179
- function H(n) {
180
- return typeof n == "string" ? h : {
181
- ...h,
182
- ...n
183
- };
184
- }
1
+ require(`./remove-accents-CXBUC-Id.cjs`);const e=require(`./match-sorter-BjnWjkKu.cjs`);exports.defaultBaseSortFn=e.t,exports.matchSorter=e.n,exports.rankings=e.r;
@@ -0,0 +1,2 @@
1
+ import { a as RankingInfo, c as matchSorter, i as MatchSorterOptions, l as rankings, n as KeyAttributesOptions, o as ValueGetterKey, r as KeyOption, s as defaultBaseSortFn, t as KeyAttributes } from "./match-sorter-CMYN3GuY.cjs";
2
+ export { KeyAttributes, KeyAttributesOptions, KeyOption, MatchSorterOptions, RankingInfo, ValueGetterKey, defaultBaseSortFn, matchSorter, rankings };
@@ -0,0 +1,2 @@
1
+ import { a as RankingInfo, c as matchSorter, i as MatchSorterOptions, l as rankings, n as KeyAttributesOptions, o as ValueGetterKey, r as KeyOption, s as defaultBaseSortFn, t as KeyAttributes } from "./match-sorter-DCRerxVe.mjs";
2
+ export { KeyAttributes, KeyAttributesOptions, KeyOption, MatchSorterOptions, RankingInfo, ValueGetterKey, defaultBaseSortFn, matchSorter, rankings };
@@ -1 +1 @@
1
- import{removeAccents as b}from"./remove-accents";const I={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},g=(n,e)=>String(n.rankedValue).localeCompare(String(e.rankedValue));function T(n,e,t={}){const{keys:r,threshold:c=I.MATCHES,baseSort:s=g,sorter:y=i=>i.sort((o,l)=>V(o,l,s))}=t,u=n.reduce((i,o,l)=>a(i,o,l),[]);return y(u).map(({item:i})=>i);function a(i,o,l){const m=O(o,r,e,t),{rank:p,keyThreshold:f=c}=m;return p>=f&&i.push({...m,item:o,index:l}),i}}T.rankings=I;function O(n,e,t,r){if(!e){const s=n;return{rankedValue:s,rank:k(s,t,r),keyIndex:-1,keyThreshold:r.threshold}}return M(n,e).reduce(({rank:s,rankedValue:y,keyIndex:u,keyThreshold:a},{itemValue:i,attributes:o},l)=>{let m=k(i,t,r),p=y;const{minRanking:f,maxRanking:d,threshold:R}=o;return m<f&&m>=I.MATCHES?m=f:m>d&&(m=d),m>s&&(s=m,u=l,a=R,p=i),{rankedValue:p,rank:s,keyIndex:u,keyThreshold:a}},{rankedValue:n,rank:I.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold})}function k(n,e,t){return n=A(n,t),e=A(e,t),e.length>n.length?I.NO_MATCH:n===e?I.CASE_SENSITIVE_EQUAL:(n=n.toLowerCase(),e=e.toLowerCase(),n===e?I.EQUAL:n.startsWith(e)?I.STARTS_WITH:n.includes(` ${e}`)?I.WORD_STARTS_WITH:n.includes(e)?I.CONTAINS:e.length===1?I.NO_MATCH:S(n).includes(e)?I.ACRONYM:C(n,e))}function S(n){let e="";const t=n.split(" ");for(const r of t){const c=r.split("-");for(const s of c)e+=s.slice(0,1)}return e}function C(n,e){let t=0,r=0;function c(a,i,o){for(let l=o,m=i.length;l<m;l++)if(i[l]===a)return t+=1,l+1;return-1}function s(a){const i=1/a,o=t/e.length;return I.MATCHES+o*i}const y=c(e[0],n,0);if(y<0)return I.NO_MATCH;r=y;for(let a=1,i=e.length;a<i;a++){const o=e[a];if(r=c(o,n,r),!(r>-1))return I.NO_MATCH}const u=r-y;return s(u)}function V(n,e,t){const{rank:s,keyIndex:y}=n,{rank:u,keyIndex:a}=e;return s===u?y===a?t(n,e):y<a?-1:1:s>u?-1:1}function A(n,{keepDiacritics:e}){return n=`${n}`,e||(n=b(n)),n}function K(n,e){typeof e=="object"&&(e=e.key);let t;if(typeof e=="function")t=e(n);else if(n===null)t=null;else if(Object.hasOwnProperty.call(n,e))t=n[e];else{if(e.includes("."))return x(e,n);t=null}return t===null?[]:Array.isArray(t)?t:[String(t)]}function x(n,e){const t=n.split(".");let r=[e];for(let c=0,s=t.length;c<s;c++){const y=t[c];let u=[];for(let a=0,i=r.length;a<i;a++){const o=r[a];if(o!==null)if(y&&Object.hasOwnProperty.call(o,y)){const l=o[y];l!==null&&u.push(l)}else o&&y==="*"&&(u=[...u,o])}r=u}return Array.isArray(r[0])?[].concat(...r):r}function M(n,e){const t=[];for(let r=0,c=e.length;r<c;r++){const s=e[r],y=H(s),u=K(n,s);for(let a=0,i=u.length;a<i;a++)t.push({itemValue:u[a],attributes:y})}return t}const h={maxRanking:1/0,minRanking:-1/0};function H(n){return typeof n=="string"?h:{...h,...n}}export{g as defaultBaseSortFn,T as matchSorter,I as rankings};
1
+ import"./remove-accents-BFmyvTRZ.mjs";import{n as e,r as t,t as n}from"./match-sorter-B9_7YvTo.mjs";export{n as defaultBaseSortFn,e as matchSorter,t as rankings};
@@ -0,0 +1,2 @@
1
+ const e=e=>{let t=Object.prototype.hasOwnProperty,n={};return r=>t.call(n,r)?n[r]:n[r]=e(r)};export{e as t};
2
+ //# sourceMappingURL=memoize-Cr5jFKxi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memoize-Cr5jFKxi.mjs","names":["results: Record<string, T>"],"sources":["../src/memoize.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 * Memoizes a function based on its string identifier.\n *\n * @param fn - The function to memoize.\n * @returns A memoized version of the input function.\n */\nexport const memoizeOnId = <T>(fn: (id: string) => T) => {\n // eslint-disable-next-line ts/unbound-method\n const hasOwnProperty = Object.prototype.hasOwnProperty;\n const results: Record<string, T> = {};\n\n const memoizedFn = (id: string) => {\n if (hasOwnProperty.call(results, id)) {\n return results[id];\n }\n return (results[id] = fn(id));\n };\n\n return memoizedFn;\n};\n"],"mappings":"AAwBA,MAAa,EAAkB,GAA0B,CAEvD,IAAM,EAAiB,OAAO,UAAU,eAClCA,EAA6B,EAAE,CASrC,MAPoB,IACd,EAAe,KAAK,EAAS,EAAG,CAC3B,EAAQ,GAET,EAAQ,GAAM,EAAG,EAAG"}
@@ -0,0 +1,11 @@
1
+ //#region src/memoize.d.ts
2
+ /**
3
+ * Memoizes a function based on its string identifier.
4
+ *
5
+ * @param fn - The function to memoize.
6
+ * @returns A memoized version of the input function.
7
+ */
8
+ declare const memoizeOnId: <T>(fn: (id: string) => T) => (id: string) => T | undefined;
9
+ //#endregion
10
+ export { memoizeOnId as t };
11
+ //# sourceMappingURL=memoize-TyrmWrfR.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memoize-TyrmWrfR.d.mts","names":[],"sources":["../src/memoize.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;cAAa,qCAAsC,sBAKnB"}
@@ -0,0 +1 @@
1
+ const e=e=>{let t=Object.prototype.hasOwnProperty,n={};return r=>t.call(n,r)?n[r]:n[r]=e(r)};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -0,0 +1,11 @@
1
+ //#region src/memoize.d.ts
2
+ /**
3
+ * Memoizes a function based on its string identifier.
4
+ *
5
+ * @param fn - The function to memoize.
6
+ * @returns A memoized version of the input function.
7
+ */
8
+ declare const memoizeOnId: <T>(fn: (id: string) => T) => (id: string) => T | undefined;
9
+ //#endregion
10
+ export { memoizeOnId as t };
11
+ //# sourceMappingURL=memoize-tSTYY522.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memoize-tSTYY522.d.cts","names":[],"sources":["../src/memoize.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;cAAa,qCAAsC,sBAKnB"}
package/dist/memoize.cjs CHANGED
@@ -1,12 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.memoizeOnId = void 0;
7
- const memoizeOnId = e => {
8
- const n = Object.prototype.hasOwnProperty,
9
- t = {};
10
- return r => n.call(t, r) ? t[r] : t[r] = e(r);
11
- };
12
- exports.memoizeOnId = memoizeOnId;
1
+ const e=require(`./memoize-qxvbI-0y.cjs`);exports.memoizeOnId=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as memoizeOnId } from "./memoize-tSTYY522.cjs";
2
+ export { memoizeOnId };
@@ -0,0 +1,2 @@
1
+ import { t as memoizeOnId } from "./memoize-TyrmWrfR.mjs";
2
+ export { memoizeOnId };
package/dist/memoize.mjs CHANGED
@@ -1 +1 @@
1
- export const memoizeOnId=e=>{const n=Object.prototype.hasOwnProperty,t={};return r=>n.call(t,r)?t[r]:t[r]=e(r)};
1
+ import{t as e}from"./memoize-Cr5jFKxi.mjs";export{e as memoizeOnId};
@@ -0,0 +1 @@
1
+ const e=require(`./semaphore-DkHqPlow.cjs`);var t=class{semaphore=new e.t(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -0,0 +1,72 @@
1
+ //#region src/mutex.d.ts
2
+ /**
3
+ * A Mutex (mutual exclusion lock) for async functions.
4
+ * It allows only one async task to access a critical section at a time.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * const mutex = new Mutex();
9
+ *
10
+ * async function criticalSection() {
11
+ * await mutex.acquire();
12
+ * try {
13
+ * // This code section cannot be executed simultaneously
14
+ * } finally {
15
+ * mutex.release();
16
+ * }
17
+ * }
18
+ *
19
+ * criticalSection();
20
+ * criticalSection(); // This call will wait until the first call releases the mutex.
21
+ * ```
22
+ */
23
+ declare class Mutex {
24
+ private semaphore;
25
+ /**
26
+ * Checks if the mutex is currently locked.
27
+ * @returns True if the mutex is locked, false otherwise.
28
+ *
29
+ * @example
30
+ * const mutex = new Mutex();
31
+ * console.log(mutex.isLocked); // false
32
+ * await mutex.acquire();
33
+ * console.log(mutex.isLocked); // true
34
+ * mutex.release();
35
+ * console.log(mutex.isLocked); // false
36
+ */
37
+ get isLocked(): boolean;
38
+ /**
39
+ * Acquires the mutex, blocking if necessary until it is available.
40
+ * @returns A promise that resolves when the mutex is acquired.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const mutex = new Mutex();
45
+ * await mutex.acquire();
46
+ * try {
47
+ * // This code section cannot be executed simultaneously
48
+ * } finally {
49
+ * mutex.release();
50
+ * }
51
+ * ```
52
+ */
53
+ acquire(): Promise<void>;
54
+ /**
55
+ * Releases the mutex, allowing another waiting task to proceed.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * const mutex = new Mutex();
60
+ * await mutex.acquire();
61
+ * try {
62
+ * // This code section cannot be executed simultaneously
63
+ * } finally {
64
+ * mutex.release(); // Allows another waiting task to proceed.
65
+ * }
66
+ * ```
67
+ */
68
+ release(): void;
69
+ }
70
+ //#endregion
71
+ export { Mutex as t };
72
+ //# sourceMappingURL=mutex-DAZduiSP.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutex-DAZduiSP.d.mts","names":[],"sources":["../src/mutex.ts"],"sourcesContent":[],"mappings":";;AAyCA;;;;;;;;;;;;;;;;;;;;cAAa,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkCa"}
@@ -0,0 +1,72 @@
1
+ //#region src/mutex.d.ts
2
+ /**
3
+ * A Mutex (mutual exclusion lock) for async functions.
4
+ * It allows only one async task to access a critical section at a time.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * const mutex = new Mutex();
9
+ *
10
+ * async function criticalSection() {
11
+ * await mutex.acquire();
12
+ * try {
13
+ * // This code section cannot be executed simultaneously
14
+ * } finally {
15
+ * mutex.release();
16
+ * }
17
+ * }
18
+ *
19
+ * criticalSection();
20
+ * criticalSection(); // This call will wait until the first call releases the mutex.
21
+ * ```
22
+ */
23
+ declare class Mutex {
24
+ private semaphore;
25
+ /**
26
+ * Checks if the mutex is currently locked.
27
+ * @returns True if the mutex is locked, false otherwise.
28
+ *
29
+ * @example
30
+ * const mutex = new Mutex();
31
+ * console.log(mutex.isLocked); // false
32
+ * await mutex.acquire();
33
+ * console.log(mutex.isLocked); // true
34
+ * mutex.release();
35
+ * console.log(mutex.isLocked); // false
36
+ */
37
+ get isLocked(): boolean;
38
+ /**
39
+ * Acquires the mutex, blocking if necessary until it is available.
40
+ * @returns A promise that resolves when the mutex is acquired.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const mutex = new Mutex();
45
+ * await mutex.acquire();
46
+ * try {
47
+ * // This code section cannot be executed simultaneously
48
+ * } finally {
49
+ * mutex.release();
50
+ * }
51
+ * ```
52
+ */
53
+ acquire(): Promise<void>;
54
+ /**
55
+ * Releases the mutex, allowing another waiting task to proceed.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * const mutex = new Mutex();
60
+ * await mutex.acquire();
61
+ * try {
62
+ * // This code section cannot be executed simultaneously
63
+ * } finally {
64
+ * mutex.release(); // Allows another waiting task to proceed.
65
+ * }
66
+ * ```
67
+ */
68
+ release(): void;
69
+ }
70
+ //#endregion
71
+ export { Mutex as t };
72
+ //# sourceMappingURL=mutex-DCyX7B66.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutex-DCyX7B66.d.cts","names":[],"sources":["../src/mutex.ts"],"sourcesContent":[],"mappings":";;AAyCA;;;;;;;;;;;;;;;;;;;;cAAa,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkCa"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./semaphore-4zJqtox8.mjs";var t=class{semaphore=new e(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}};export{t};
2
+ //# sourceMappingURL=mutex-TqoKHosg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutex-TqoKHosg.mjs","names":[],"sources":["../src/mutex.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\nimport { Semaphore } from \"./semaphore\";\n\n/**\n * A Mutex (mutual exclusion lock) for async functions.\n * It allows only one async task to access a critical section at a time.\n *\n * @example\n * ```typescript\n * const mutex = new Mutex();\n *\n * async function criticalSection() {\n * await mutex.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * mutex.release();\n * }\n * }\n *\n * criticalSection();\n * criticalSection(); // This call will wait until the first call releases the mutex.\n * ```\n */\nexport class Mutex {\n private semaphore = new Semaphore(1);\n\n /**\n * Checks if the mutex is currently locked.\n * @returns True if the mutex is locked, false otherwise.\n *\n * @example\n * const mutex = new Mutex();\n * console.log(mutex.isLocked); // false\n * await mutex.acquire();\n * console.log(mutex.isLocked); // true\n * mutex.release();\n * console.log(mutex.isLocked); // false\n */\n public get isLocked(): boolean {\n return this.semaphore.available === 0;\n }\n\n /**\n * Acquires the mutex, blocking if necessary until it is available.\n * @returns A promise that resolves when the mutex is acquired.\n *\n * @example\n * ```typescript\n * const mutex = new Mutex();\n * await mutex.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * mutex.release();\n * }\n * ```\n */\n public async acquire(): Promise<void> {\n return this.semaphore.acquire();\n }\n\n /**\n * Releases the mutex, allowing another waiting task to proceed.\n *\n * @example\n * ```typescript\n * const mutex = new Mutex();\n * await mutex.acquire();\n * try {\n * // This code section cannot be executed simultaneously\n * } finally {\n * mutex.release(); // Allows another waiting task to proceed.\n * }\n * ```\n */\n public release(): void {\n this.semaphore.release();\n }\n}\n"],"mappings":"6CAyCA,IAAa,EAAb,KAAmB,CACjB,UAAoB,IAAI,EAAU,EAAE,CAcpC,IAAW,UAAoB,CAC7B,OAAO,KAAK,UAAU,YAAc,EAkBtC,MAAa,SAAyB,CACpC,OAAO,KAAK,UAAU,SAAS,CAiBjC,SAAuB,CACrB,KAAK,UAAU,SAAS"}
package/dist/mutex.cjs CHANGED
@@ -1,20 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Mutex = void 0;
7
- var _semaphore = require("./semaphore.cjs");
8
- class Mutex {
9
- semaphore = new _semaphore.Semaphore(1);
10
- get isLocked() {
11
- return this.semaphore.available === 0;
12
- }
13
- async acquire() {
14
- return this.semaphore.acquire();
15
- }
16
- release() {
17
- this.semaphore.release();
18
- }
19
- }
20
- exports.Mutex = Mutex;
1
+ const e=require(`./mutex-CnQQBndt.cjs`);exports.Mutex=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as Mutex } from "./mutex-DCyX7B66.cjs";
2
+ export { Mutex };
@@ -0,0 +1,2 @@
1
+ import { t as Mutex } from "./mutex-DAZduiSP.mjs";
2
+ export { Mutex };
package/dist/mutex.mjs CHANGED
@@ -1 +1 @@
1
- import{Semaphore as e}from"./semaphore";export class Mutex{semaphore=new e(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}}
1
+ import{t as e}from"./mutex-TqoKHosg.mjs";export{e as Mutex};
@@ -0,0 +1,2 @@
1
+ const e=e=>{};async function t(e){}export{e as n,t};
2
+ //# sourceMappingURL=noop-B7OetrhD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop-B7OetrhD.mjs","names":[],"sources":["../src/noop.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 * A no op, or no-op, function for no operation\n *\n * @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h | this article} for more information.\n *\n * @param _params - An optional parameter passed to the function. It can be anything (but is not used in any way)\n */\nexport const noop = (_params?: unknown): void => {};\n\n/**\n * An asynchronous no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * asyncNoop(); // Does nothing\n *\n * @returns This function returns a Promise that resolves to undefined.\n */\nexport async function asyncNoop(_params?: unknown): Promise<void> {}\n"],"mappings":"AAwBA,MAAa,EAAQ,GAA4B,GAWjD,eAAsB,EAAU,EAAkC"}
@@ -1,3 +1,4 @@
1
+ //#region src/noop.d.ts
1
2
  /**
2
3
  * A no op, or no-op, function for no operation
3
4
  *
@@ -5,7 +6,7 @@
5
6
  *
6
7
  * @param _params - An optional parameter passed to the function. It can be anything (but is not used in any way)
7
8
  */
8
- export declare const noop: (_params?: unknown) => void;
9
+ declare const noop: (_params?: unknown) => void;
9
10
  /**
10
11
  * An asynchronous no-operation function that does nothing.
11
12
  * This can be used as a placeholder or default function.
@@ -15,4 +16,7 @@ export declare const noop: (_params?: unknown) => void;
15
16
  *
16
17
  * @returns This function returns a Promise that resolves to undefined.
17
18
  */
18
- export declare function asyncNoop(_params?: unknown): Promise<void>;
19
+ declare function asyncNoop(_params?: unknown): Promise<void>;
20
+ //#endregion
21
+ export { noop as n, asyncNoop as t };
22
+ //# sourceMappingURL=noop-BnXKMH6Z.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop-BnXKMH6Z.d.mts","names":[],"sources":["../src/noop.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAWA;;;;;cAXa;;;;;;;;;;iBAWS,SAAA,qBAA8B"}
@@ -0,0 +1,22 @@
1
+ //#region src/noop.d.ts
2
+ /**
3
+ * A no op, or no-op, function for no operation
4
+ *
5
+ * @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h | this article} for more information.
6
+ *
7
+ * @param _params - An optional parameter passed to the function. It can be anything (but is not used in any way)
8
+ */
9
+ declare const noop: (_params?: unknown) => void;
10
+ /**
11
+ * An asynchronous no-operation function that does nothing.
12
+ * This can be used as a placeholder or default function.
13
+ *
14
+ * @example
15
+ * asyncNoop(); // Does nothing
16
+ *
17
+ * @returns This function returns a Promise that resolves to undefined.
18
+ */
19
+ declare function asyncNoop(_params?: unknown): Promise<void>;
20
+ //#endregion
21
+ export { noop as n, asyncNoop as t };
22
+ //# sourceMappingURL=noop-CnJXOCpF.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop-CnJXOCpF.d.cts","names":[],"sources":["../src/noop.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAWA;;;;;cAXa;;;;;;;;;;iBAWS,SAAA,qBAA8B"}
@@ -0,0 +1 @@
1
+ const e=e=>{};async function t(e){}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
package/dist/noop.cjs CHANGED
@@ -1,10 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.asyncNoop = asyncNoop;
7
- exports.noop = void 0;
8
- const noop = o => {};
9
- exports.noop = noop;
10
- async function asyncNoop(o) {}
1
+ const e=require(`./noop-Dpf7hIui.cjs`);exports.asyncNoop=e.t,exports.noop=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as noop, t as asyncNoop } from "./noop-CnJXOCpF.cjs";
2
+ export { asyncNoop, noop };
@@ -0,0 +1,2 @@
1
+ import { n as noop, t as asyncNoop } from "./noop-BnXKMH6Z.mjs";
2
+ export { asyncNoop, noop };
package/dist/noop.mjs CHANGED
@@ -1 +1 @@
1
- export const noop=o=>{};export async function asyncNoop(o){}
1
+ import{n as e,t}from"./noop-B7OetrhD.mjs";export{t as asyncNoop,e as noop};