@stryke/helpers 0.9.26 → 0.9.27

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 (548) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/arg-identity.cjs +1 -1
  3. package/dist/arg-identity.d.cts +14 -2
  4. package/dist/arg-identity.d.cts.map +1 -0
  5. package/dist/arg-identity.d.mts +14 -2
  6. package/dist/arg-identity.d.mts.map +1 -0
  7. package/dist/arg-identity.mjs +2 -1
  8. package/dist/arg-identity.mjs.map +1 -0
  9. package/dist/convert/src/to-string-key.cjs +1 -0
  10. package/dist/convert/src/to-string-key.mjs +2 -0
  11. package/dist/convert/src/to-string-key.mjs.map +1 -0
  12. package/dist/debounce.cjs +1 -1
  13. package/dist/debounce.d.cts +47 -2
  14. package/dist/debounce.d.cts.map +1 -0
  15. package/dist/debounce.d.mts +47 -2
  16. package/dist/debounce.d.mts.map +1 -0
  17. package/dist/debounce.mjs +2 -1
  18. package/dist/debounce.mjs.map +1 -0
  19. package/dist/deep-clone.cjs +1 -1
  20. package/dist/deep-clone.d.cts +65 -2
  21. package/dist/deep-clone.d.cts.map +1 -0
  22. package/dist/deep-clone.d.mts +65 -2
  23. package/dist/deep-clone.d.mts.map +1 -0
  24. package/dist/deep-clone.mjs +2 -1
  25. package/dist/deep-clone.mjs.map +1 -0
  26. package/dist/deep-merge.cjs +1 -1
  27. package/dist/deep-merge.d.cts +26 -2
  28. package/dist/deep-merge.d.cts.map +1 -0
  29. package/dist/deep-merge.d.mts +26 -2
  30. package/dist/deep-merge.d.mts.map +1 -0
  31. package/dist/deep-merge.mjs +2 -1
  32. package/dist/deep-merge.mjs.map +1 -0
  33. package/dist/delay.cjs +1 -1
  34. package/dist/delay.d.cts +77 -2
  35. package/dist/delay.d.cts.map +1 -0
  36. package/dist/delay.d.mts +77 -2
  37. package/dist/delay.d.mts.map +1 -0
  38. package/dist/delay.mjs +2 -1
  39. package/dist/delay.mjs.map +1 -0
  40. package/dist/errors.cjs +1 -1
  41. package/dist/errors.mjs +2 -1
  42. package/dist/errors.mjs.map +1 -0
  43. package/dist/filter-empty.cjs +1 -1
  44. package/dist/filter-empty.d.cts +5 -2
  45. package/dist/filter-empty.d.cts.map +1 -0
  46. package/dist/filter-empty.d.mts +5 -2
  47. package/dist/filter-empty.d.mts.map +1 -0
  48. package/dist/filter-empty.mjs +2 -1
  49. package/dist/filter-empty.mjs.map +1 -0
  50. package/dist/flatten-object.cjs +1 -1
  51. package/dist/flatten-object.d.cts +35 -2
  52. package/dist/flatten-object.d.cts.map +1 -0
  53. package/dist/flatten-object.d.mts +35 -2
  54. package/dist/flatten-object.d.mts.map +1 -0
  55. package/dist/flatten-object.mjs +2 -1
  56. package/dist/flatten-object.mjs.map +1 -0
  57. package/dist/get-field.cjs +1 -1
  58. package/dist/get-field.d.cts +254 -2
  59. package/dist/get-field.d.cts.map +1 -0
  60. package/dist/get-field.d.mts +254 -2
  61. package/dist/get-field.d.mts.map +1 -0
  62. package/dist/get-field.mjs +2 -1
  63. package/dist/get-field.mjs.map +1 -0
  64. package/dist/get-ordered-by.cjs +1 -1
  65. package/dist/get-ordered-by.d.cts +39 -2
  66. package/dist/get-ordered-by.d.cts.map +1 -0
  67. package/dist/get-ordered-by.d.mts +39 -2
  68. package/dist/get-ordered-by.d.mts.map +1 -0
  69. package/dist/get-ordered-by.mjs +2 -1
  70. package/dist/get-ordered-by.mjs.map +1 -0
  71. package/dist/get-unique.cjs +1 -1
  72. package/dist/get-unique.d.cts +26 -2
  73. package/dist/get-unique.d.cts.map +1 -0
  74. package/dist/get-unique.d.mts +26 -2
  75. package/dist/get-unique.d.mts.map +1 -0
  76. package/dist/get-unique.mjs +2 -1
  77. package/dist/get-unique.mjs.map +1 -0
  78. package/dist/identity.cjs +1 -1
  79. package/dist/identity.d.cts +18 -2
  80. package/dist/identity.d.cts.map +1 -0
  81. package/dist/identity.d.mts +18 -2
  82. package/dist/identity.d.mts.map +1 -0
  83. package/dist/identity.mjs +2 -1
  84. package/dist/identity.mjs.map +1 -0
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.d.cts +31 -31
  87. package/dist/index.d.mts +31 -31
  88. package/dist/index.mjs +1 -1
  89. package/dist/is-equal.cjs +1 -1
  90. package/dist/is-equal.d.cts +22 -2
  91. package/dist/is-equal.d.cts.map +1 -0
  92. package/dist/is-equal.d.mts +22 -2
  93. package/dist/is-equal.d.mts.map +1 -0
  94. package/dist/is-equal.mjs +2 -1
  95. package/dist/is-equal.mjs.map +1 -0
  96. package/dist/lru-cache.cjs +1 -1
  97. package/dist/lru-cache.d.cts +103 -2
  98. package/dist/lru-cache.d.cts.map +1 -0
  99. package/dist/lru-cache.d.mts +103 -2
  100. package/dist/lru-cache.d.mts.map +1 -0
  101. package/dist/lru-cache.mjs +2 -1
  102. package/dist/lru-cache.mjs.map +1 -0
  103. package/dist/match-sorter.cjs +1 -1
  104. package/dist/match-sorter.d.cts +78 -2
  105. package/dist/match-sorter.d.cts.map +1 -0
  106. package/dist/match-sorter.d.mts +78 -2
  107. package/dist/match-sorter.d.mts.map +1 -0
  108. package/dist/match-sorter.mjs +2 -1
  109. package/dist/match-sorter.mjs.map +1 -0
  110. package/dist/memoize.cjs +1 -1
  111. package/dist/memoize.d.cts +11 -2
  112. package/dist/memoize.d.cts.map +1 -0
  113. package/dist/memoize.d.mts +11 -2
  114. package/dist/memoize.d.mts.map +1 -0
  115. package/dist/memoize.mjs +2 -1
  116. package/dist/memoize.mjs.map +1 -0
  117. package/dist/mutex.cjs +1 -1
  118. package/dist/mutex.d.cts +72 -2
  119. package/dist/mutex.d.cts.map +1 -0
  120. package/dist/mutex.d.mts +72 -2
  121. package/dist/mutex.d.mts.map +1 -0
  122. package/dist/mutex.mjs +2 -1
  123. package/dist/mutex.mjs.map +1 -0
  124. package/dist/noop.cjs +1 -1
  125. package/dist/noop.d.cts +22 -2
  126. package/dist/noop.d.cts.map +1 -0
  127. package/dist/noop.d.mts +22 -2
  128. package/dist/noop.d.mts.map +1 -0
  129. package/dist/noop.mjs +2 -1
  130. package/dist/noop.mjs.map +1 -0
  131. package/dist/omit.cjs +1 -1
  132. package/dist/omit.d.cts +22 -2
  133. package/dist/omit.d.cts.map +1 -0
  134. package/dist/omit.d.mts +22 -2
  135. package/dist/omit.d.mts.map +1 -0
  136. package/dist/omit.mjs +2 -1
  137. package/dist/omit.mjs.map +1 -0
  138. package/dist/once.cjs +1 -1
  139. package/dist/once.d.cts +13 -2
  140. package/dist/once.d.cts.map +1 -0
  141. package/dist/once.d.mts +13 -2
  142. package/dist/once.d.mts.map +1 -0
  143. package/dist/once.mjs +2 -1
  144. package/dist/once.mjs.map +1 -0
  145. package/dist/pick.cjs +1 -1
  146. package/dist/pick.d.cts +22 -2
  147. package/dist/pick.d.cts.map +1 -0
  148. package/dist/pick.d.mts +22 -2
  149. package/dist/pick.d.mts.map +1 -0
  150. package/dist/pick.mjs +2 -1
  151. package/dist/pick.mjs.map +1 -0
  152. package/dist/remove-accents.cjs +1 -1
  153. package/dist/remove-accents.d.cts +12 -2
  154. package/dist/remove-accents.d.cts.map +1 -0
  155. package/dist/remove-accents.d.mts +12 -2
  156. package/dist/remove-accents.d.mts.map +1 -0
  157. package/dist/remove-accents.mjs +2 -1
  158. package/dist/remove-accents.mjs.map +1 -0
  159. package/dist/remove-empty-items.cjs +1 -1
  160. package/dist/remove-empty-items.d.cts +11 -2
  161. package/dist/remove-empty-items.d.cts.map +1 -0
  162. package/dist/remove-empty-items.d.mts +11 -2
  163. package/dist/remove-empty-items.d.mts.map +1 -0
  164. package/dist/remove-empty-items.mjs +2 -1
  165. package/dist/remove-empty-items.mjs.map +1 -0
  166. package/dist/semaphore.cjs +1 -1
  167. package/dist/semaphore.d.cts +86 -2
  168. package/dist/semaphore.d.cts.map +1 -0
  169. package/dist/semaphore.d.mts +86 -2
  170. package/dist/semaphore.d.mts.map +1 -0
  171. package/dist/semaphore.mjs +2 -1
  172. package/dist/semaphore.mjs.map +1 -0
  173. package/dist/set-field.cjs +1 -1
  174. package/dist/set-field.d.cts +16 -2
  175. package/dist/set-field.d.cts.map +1 -0
  176. package/dist/set-field.d.mts +16 -2
  177. package/dist/set-field.d.mts.map +1 -0
  178. package/dist/set-field.mjs +2 -1
  179. package/dist/set-field.mjs.map +1 -0
  180. package/dist/throttle.cjs +1 -1
  181. package/dist/throttle.d.cts +32 -2
  182. package/dist/throttle.d.cts.map +1 -0
  183. package/dist/throttle.d.mts +32 -2
  184. package/dist/throttle.d.mts.map +1 -0
  185. package/dist/throttle.mjs +2 -1
  186. package/dist/throttle.mjs.map +1 -0
  187. package/dist/timeout.cjs +1 -1
  188. package/dist/timeout.d.cts +12 -2
  189. package/dist/timeout.d.cts.map +1 -0
  190. package/dist/timeout.d.mts +12 -2
  191. package/dist/timeout.d.mts.map +1 -0
  192. package/dist/timeout.mjs +2 -1
  193. package/dist/timeout.mjs.map +1 -0
  194. package/dist/to-deep-key.cjs +1 -1
  195. package/dist/to-deep-key.d.cts +42 -2
  196. package/dist/to-deep-key.d.cts.map +1 -0
  197. package/dist/to-deep-key.d.mts +42 -2
  198. package/dist/to-deep-key.d.mts.map +1 -0
  199. package/dist/to-deep-key.mjs +2 -1
  200. package/dist/to-deep-key.mjs.map +1 -0
  201. package/dist/to-path.cjs +1 -1
  202. package/dist/to-path.d.cts +24 -2
  203. package/dist/to-path.d.cts.map +1 -0
  204. package/dist/to-path.d.mts +24 -2
  205. package/dist/to-path.d.mts.map +1 -0
  206. package/dist/to-path.mjs +2 -1
  207. package/dist/to-path.mjs.map +1 -0
  208. package/dist/type-checks/src/get-object-tag.cjs +1 -0
  209. package/dist/type-checks/src/get-object-tag.mjs +2 -0
  210. package/dist/type-checks/src/get-object-tag.mjs.map +1 -0
  211. package/dist/type-checks/src/is-deep-key.cjs +1 -0
  212. package/dist/type-checks/src/is-deep-key.mjs +2 -0
  213. package/dist/type-checks/src/is-deep-key.mjs.map +1 -0
  214. package/dist/type-checks/src/is-empty.cjs +1 -0
  215. package/dist/type-checks/src/is-empty.mjs +2 -0
  216. package/dist/type-checks/src/is-empty.mjs.map +1 -0
  217. package/dist/type-checks/src/is-function.cjs +1 -0
  218. package/dist/type-checks/src/is-function.mjs +2 -0
  219. package/dist/type-checks/src/is-function.mjs.map +1 -0
  220. package/dist/type-checks/src/is-mergeable-object.cjs +1 -0
  221. package/dist/type-checks/src/is-mergeable-object.mjs +2 -0
  222. package/dist/type-checks/src/is-mergeable-object.mjs.map +1 -0
  223. package/dist/type-checks/src/is-non-null-object.cjs +1 -0
  224. package/dist/type-checks/src/is-non-null-object.mjs +2 -0
  225. package/dist/type-checks/src/is-non-null-object.mjs.map +1 -0
  226. package/dist/type-checks/src/is-null.cjs +1 -0
  227. package/dist/type-checks/src/is-null.mjs +2 -0
  228. package/dist/type-checks/src/is-null.mjs.map +1 -0
  229. package/dist/type-checks/src/is-number.cjs +1 -0
  230. package/dist/type-checks/src/is-number.mjs +2 -0
  231. package/dist/type-checks/src/is-number.mjs.map +1 -0
  232. package/dist/type-checks/src/is-object-index.cjs +1 -0
  233. package/dist/type-checks/src/is-object-index.mjs +2 -0
  234. package/dist/type-checks/src/is-object-index.mjs.map +1 -0
  235. package/dist/type-checks/src/is-object.cjs +1 -0
  236. package/dist/type-checks/src/is-object.mjs +2 -0
  237. package/dist/type-checks/src/is-object.mjs.map +1 -0
  238. package/dist/type-checks/src/is-plain-object.cjs +1 -0
  239. package/dist/type-checks/src/is-plain-object.mjs +2 -0
  240. package/dist/type-checks/src/is-plain-object.mjs.map +1 -0
  241. package/dist/type-checks/src/is-primitive.cjs +1 -0
  242. package/dist/type-checks/src/is-primitive.mjs +2 -0
  243. package/dist/type-checks/src/is-primitive.mjs.map +1 -0
  244. package/dist/type-checks/src/is-react-element.cjs +1 -0
  245. package/dist/type-checks/src/is-react-element.mjs +2 -0
  246. package/dist/type-checks/src/is-react-element.mjs.map +1 -0
  247. package/dist/type-checks/src/is-set-string.cjs +1 -0
  248. package/dist/type-checks/src/is-set-string.mjs +2 -0
  249. package/dist/type-checks/src/is-set-string.mjs.map +1 -0
  250. package/dist/type-checks/src/is-set.cjs +1 -0
  251. package/dist/type-checks/src/is-set.mjs +2 -0
  252. package/dist/type-checks/src/is-set.mjs.map +1 -0
  253. package/dist/{is-string-CvmuuuDj.mjs → type-checks/src/is-string.cjs} +1 -2
  254. package/dist/type-checks/src/is-string.mjs +2 -0
  255. package/dist/type-checks/src/is-string.mjs.map +1 -0
  256. package/dist/type-checks/src/is-typed-array.cjs +1 -0
  257. package/dist/type-checks/src/is-typed-array.mjs +2 -0
  258. package/dist/type-checks/src/is-typed-array.mjs.map +1 -0
  259. package/dist/type-checks/src/is-undefined.cjs +1 -0
  260. package/dist/type-checks/src/is-undefined.mjs +2 -0
  261. package/dist/type-checks/src/is-undefined.mjs.map +1 -0
  262. package/dist/type-checks/src/property-exists.cjs +1 -0
  263. package/dist/type-checks/src/property-exists.mjs +2 -0
  264. package/dist/type-checks/src/property-exists.mjs.map +1 -0
  265. package/dist/types/src/base.d.cts +6 -0
  266. package/dist/types/src/base.d.cts.map +1 -0
  267. package/dist/types/src/base.d.mts +6 -0
  268. package/dist/types/src/base.d.mts.map +1 -0
  269. package/dist/types/src/json.d.cts +28 -0
  270. package/dist/types/src/json.d.cts.map +1 -0
  271. package/dist/types/src/json.d.mts +28 -0
  272. package/dist/types/src/json.d.mts.map +1 -0
  273. package/dist/{object-CHmrmQna.d.mts → types/src/object.d.cts} +6 -40
  274. package/dist/types/src/object.d.cts.map +1 -0
  275. package/dist/{object-D8HGAGMr.d.cts → types/src/object.d.mts} +6 -40
  276. package/dist/types/src/object.d.mts.map +1 -0
  277. package/dist/types/src/string.d.cts +6 -0
  278. package/dist/types/src/string.d.cts.map +1 -0
  279. package/dist/types/src/string.d.mts +6 -0
  280. package/dist/types/src/string.d.mts.map +1 -0
  281. package/dist/types/src/utilities.d.cts +7 -0
  282. package/dist/types/src/utilities.d.cts.map +1 -0
  283. package/dist/types/src/utilities.d.mts +7 -0
  284. package/dist/types/src/utilities.d.mts.map +1 -0
  285. package/dist/unflatten-object.cjs +1 -1
  286. package/dist/unflatten-object.d.cts +35 -2
  287. package/dist/unflatten-object.d.cts.map +1 -0
  288. package/dist/unflatten-object.d.mts +35 -2
  289. package/dist/unflatten-object.d.mts.map +1 -0
  290. package/dist/unflatten-object.mjs +2 -1
  291. package/dist/unflatten-object.mjs.map +1 -0
  292. package/dist/union.cjs +1 -1
  293. package/dist/union.d.cts +24 -2
  294. package/dist/union.d.cts.map +1 -0
  295. package/dist/union.d.mts +24 -2
  296. package/dist/union.d.mts.map +1 -0
  297. package/dist/union.mjs +2 -1
  298. package/dist/union.mjs.map +1 -0
  299. package/dist/with-timeout.cjs +1 -1
  300. package/dist/with-timeout.d.cts +24 -2
  301. package/dist/with-timeout.d.cts.map +1 -0
  302. package/dist/with-timeout.d.mts +24 -2
  303. package/dist/with-timeout.d.mts.map +1 -0
  304. package/dist/with-timeout.mjs +2 -1
  305. package/dist/with-timeout.mjs.map +1 -0
  306. package/package.json +3 -3
  307. package/dist/arg-identity-BIir8uzO.d.mts +0 -14
  308. package/dist/arg-identity-BIir8uzO.d.mts.map +0 -1
  309. package/dist/arg-identity-BfviduMt.mjs +0 -2
  310. package/dist/arg-identity-BfviduMt.mjs.map +0 -1
  311. package/dist/arg-identity-C-pVjd0u.d.cts +0 -14
  312. package/dist/arg-identity-C-pVjd0u.d.cts.map +0 -1
  313. package/dist/arg-identity-dlKw6BsD.cjs +0 -1
  314. package/dist/debounce-C5O3IDKy.mjs +0 -2
  315. package/dist/debounce-C5O3IDKy.mjs.map +0 -1
  316. package/dist/debounce-CIMf8-Yr.d.mts +0 -47
  317. package/dist/debounce-CIMf8-Yr.d.mts.map +0 -1
  318. package/dist/debounce-CLb-VvJv.d.cts +0 -47
  319. package/dist/debounce-CLb-VvJv.d.cts.map +0 -1
  320. package/dist/debounce-SIYbhEOF.cjs +0 -1
  321. package/dist/deep-clone-BlN5QTtW.mjs +0 -2
  322. package/dist/deep-clone-BlN5QTtW.mjs.map +0 -1
  323. package/dist/deep-clone-CoUy-Hrt.cjs +0 -1
  324. package/dist/deep-clone-CpLJcTgz.d.mts +0 -65
  325. package/dist/deep-clone-CpLJcTgz.d.mts.map +0 -1
  326. package/dist/deep-clone-jRNy1xoj.d.cts +0 -65
  327. package/dist/deep-clone-jRNy1xoj.d.cts.map +0 -1
  328. package/dist/deep-merge-BDZ6c79O.mjs +0 -2
  329. package/dist/deep-merge-BDZ6c79O.mjs.map +0 -1
  330. package/dist/deep-merge-BpFjvumi.cjs +0 -1
  331. package/dist/deep-merge-C9qDSleg.d.cts +0 -26
  332. package/dist/deep-merge-C9qDSleg.d.cts.map +0 -1
  333. package/dist/deep-merge-eCT712Cv.d.mts +0 -26
  334. package/dist/deep-merge-eCT712Cv.d.mts.map +0 -1
  335. package/dist/delay-Bd_sGzMj.d.mts +0 -77
  336. package/dist/delay-Bd_sGzMj.d.mts.map +0 -1
  337. package/dist/delay-UwR_fCwt.cjs +0 -1
  338. package/dist/delay-VkcrQf1l.d.cts +0 -77
  339. package/dist/delay-VkcrQf1l.d.cts.map +0 -1
  340. package/dist/delay-wdNbY6sk.mjs +0 -2
  341. package/dist/delay-wdNbY6sk.mjs.map +0 -1
  342. package/dist/errors-BXYY8wXj.cjs +0 -1
  343. package/dist/errors-DWX9ET_b.mjs +0 -2
  344. package/dist/errors-DWX9ET_b.mjs.map +0 -1
  345. package/dist/filter-empty-5_nMg04e.cjs +0 -1
  346. package/dist/filter-empty-BMtd0K07.d.mts +0 -5
  347. package/dist/filter-empty-BMtd0K07.d.mts.map +0 -1
  348. package/dist/filter-empty-C2fq9M7o.d.cts +0 -5
  349. package/dist/filter-empty-C2fq9M7o.d.cts.map +0 -1
  350. package/dist/filter-empty-Dsc1ymCj.mjs +0 -2
  351. package/dist/filter-empty-Dsc1ymCj.mjs.map +0 -1
  352. package/dist/flatten-object-Bk2VT-b2.d.mts +0 -35
  353. package/dist/flatten-object-Bk2VT-b2.d.mts.map +0 -1
  354. package/dist/flatten-object-D-EbEZqR.cjs +0 -1
  355. package/dist/flatten-object-DFCZmly9.mjs +0 -2
  356. package/dist/flatten-object-DFCZmly9.mjs.map +0 -1
  357. package/dist/flatten-object-DjaJJaY0.d.cts +0 -35
  358. package/dist/flatten-object-DjaJJaY0.d.cts.map +0 -1
  359. package/dist/get-field-5XqtknPs.d.mts +0 -254
  360. package/dist/get-field-5XqtknPs.d.mts.map +0 -1
  361. package/dist/get-field-D4F_p-Ov.cjs +0 -1
  362. package/dist/get-field-ngQ9O38X.mjs +0 -2
  363. package/dist/get-field-ngQ9O38X.mjs.map +0 -1
  364. package/dist/get-field-oltWWNRO.d.cts +0 -254
  365. package/dist/get-field-oltWWNRO.d.cts.map +0 -1
  366. package/dist/get-object-tag-D53RvMgo.cjs +0 -1
  367. package/dist/get-object-tag-oBoWkttN.mjs +0 -2
  368. package/dist/get-object-tag-oBoWkttN.mjs.map +0 -1
  369. package/dist/get-ordered-by-C45FfW2T.d.mts +0 -39
  370. package/dist/get-ordered-by-C45FfW2T.d.mts.map +0 -1
  371. package/dist/get-ordered-by-CBKKJr4R.mjs +0 -2
  372. package/dist/get-ordered-by-CBKKJr4R.mjs.map +0 -1
  373. package/dist/get-ordered-by-D2Sr6vUN.cjs +0 -1
  374. package/dist/get-ordered-by-DuD7QRma.d.cts +0 -39
  375. package/dist/get-ordered-by-DuD7QRma.d.cts.map +0 -1
  376. package/dist/get-unique-BOiakY6A.cjs +0 -1
  377. package/dist/get-unique-C0SBPUBv.d.cts +0 -26
  378. package/dist/get-unique-C0SBPUBv.d.cts.map +0 -1
  379. package/dist/get-unique-DZ6E1Kvc.d.mts +0 -26
  380. package/dist/get-unique-DZ6E1Kvc.d.mts.map +0 -1
  381. package/dist/get-unique-DzZ7Z34U.mjs +0 -2
  382. package/dist/get-unique-DzZ7Z34U.mjs.map +0 -1
  383. package/dist/identity-B_cGeF8o.d.mts +0 -18
  384. package/dist/identity-B_cGeF8o.d.mts.map +0 -1
  385. package/dist/identity-DBwwvmGU.mjs +0 -2
  386. package/dist/identity-DBwwvmGU.mjs.map +0 -1
  387. package/dist/identity-DRhIvbPG.d.cts +0 -18
  388. package/dist/identity-DRhIvbPG.d.cts.map +0 -1
  389. package/dist/identity-z2xaIqpe.cjs +0 -1
  390. package/dist/is-empty-C7vlSVFD.mjs +0 -2
  391. package/dist/is-empty-C7vlSVFD.mjs.map +0 -1
  392. package/dist/is-empty-DZZDqzjD.cjs +0 -1
  393. package/dist/is-equal-0Z-K2uIG.mjs +0 -2
  394. package/dist/is-equal-0Z-K2uIG.mjs.map +0 -1
  395. package/dist/is-equal-BJgVhUVS.cjs +0 -1
  396. package/dist/is-equal-BMlMHlVi.d.cts +0 -22
  397. package/dist/is-equal-BMlMHlVi.d.cts.map +0 -1
  398. package/dist/is-equal-Baqurdpn.d.mts +0 -22
  399. package/dist/is-equal-Baqurdpn.d.mts.map +0 -1
  400. package/dist/is-number-BcjxCzDM.cjs +0 -1
  401. package/dist/is-number-bwhfkHlC.mjs +0 -2
  402. package/dist/is-number-bwhfkHlC.mjs.map +0 -1
  403. package/dist/is-plain-object-BQuFhL4M.cjs +0 -1
  404. package/dist/is-plain-object-D8GSMOhY.mjs +0 -2
  405. package/dist/is-plain-object-D8GSMOhY.mjs.map +0 -1
  406. package/dist/is-set-B9o0NIT4.mjs +0 -2
  407. package/dist/is-set-B9o0NIT4.mjs.map +0 -1
  408. package/dist/is-set-ByJOY6h2.cjs +0 -1
  409. package/dist/is-set-string-48_jZFw0.cjs +0 -1
  410. package/dist/is-set-string-Dr1MlMk0.mjs +0 -2
  411. package/dist/is-set-string-Dr1MlMk0.mjs.map +0 -1
  412. package/dist/is-string-CvmuuuDj.mjs.map +0 -1
  413. package/dist/is-string-DPanLeA_.cjs +0 -1
  414. package/dist/lru-cache-CzQ_kKXk.d.mts +0 -103
  415. package/dist/lru-cache-CzQ_kKXk.d.mts.map +0 -1
  416. package/dist/lru-cache-D4VEIgtR.d.cts +0 -103
  417. package/dist/lru-cache-D4VEIgtR.d.cts.map +0 -1
  418. package/dist/lru-cache-DLY_yZRN.mjs +0 -2
  419. package/dist/lru-cache-DLY_yZRN.mjs.map +0 -1
  420. package/dist/lru-cache-DgTSGx5W.cjs +0 -1
  421. package/dist/match-sorter-B9_7YvTo.mjs +0 -2
  422. package/dist/match-sorter-B9_7YvTo.mjs.map +0 -1
  423. package/dist/match-sorter-BjnWjkKu.cjs +0 -1
  424. package/dist/match-sorter-CMYN3GuY.d.cts +0 -78
  425. package/dist/match-sorter-CMYN3GuY.d.cts.map +0 -1
  426. package/dist/match-sorter-DCRerxVe.d.mts +0 -78
  427. package/dist/match-sorter-DCRerxVe.d.mts.map +0 -1
  428. package/dist/memoize-Cr5jFKxi.mjs +0 -2
  429. package/dist/memoize-Cr5jFKxi.mjs.map +0 -1
  430. package/dist/memoize-TyrmWrfR.d.mts +0 -11
  431. package/dist/memoize-TyrmWrfR.d.mts.map +0 -1
  432. package/dist/memoize-qxvbI-0y.cjs +0 -1
  433. package/dist/memoize-tSTYY522.d.cts +0 -11
  434. package/dist/memoize-tSTYY522.d.cts.map +0 -1
  435. package/dist/mutex-CnQQBndt.cjs +0 -1
  436. package/dist/mutex-DAZduiSP.d.mts +0 -72
  437. package/dist/mutex-DAZduiSP.d.mts.map +0 -1
  438. package/dist/mutex-DCyX7B66.d.cts +0 -72
  439. package/dist/mutex-DCyX7B66.d.cts.map +0 -1
  440. package/dist/mutex-TqoKHosg.mjs +0 -2
  441. package/dist/mutex-TqoKHosg.mjs.map +0 -1
  442. package/dist/noop-B7OetrhD.mjs +0 -2
  443. package/dist/noop-B7OetrhD.mjs.map +0 -1
  444. package/dist/noop-BnXKMH6Z.d.mts +0 -22
  445. package/dist/noop-BnXKMH6Z.d.mts.map +0 -1
  446. package/dist/noop-CnJXOCpF.d.cts +0 -22
  447. package/dist/noop-CnJXOCpF.d.cts.map +0 -1
  448. package/dist/noop-Dpf7hIui.cjs +0 -1
  449. package/dist/object-CHmrmQna.d.mts.map +0 -1
  450. package/dist/object-D8HGAGMr.d.cts.map +0 -1
  451. package/dist/omit-A0uVyAS4.cjs +0 -1
  452. package/dist/omit-BROsDK0D.mjs +0 -2
  453. package/dist/omit-BROsDK0D.mjs.map +0 -1
  454. package/dist/omit-D1FKiOYz.d.cts +0 -22
  455. package/dist/omit-D1FKiOYz.d.cts.map +0 -1
  456. package/dist/omit-DpqOAtKt.d.mts +0 -22
  457. package/dist/omit-DpqOAtKt.d.mts.map +0 -1
  458. package/dist/once-DNPPQd3P.d.mts +0 -13
  459. package/dist/once-DNPPQd3P.d.mts.map +0 -1
  460. package/dist/once-DZCwmdkv.cjs +0 -1
  461. package/dist/once-DqmxXwEB.d.cts +0 -13
  462. package/dist/once-DqmxXwEB.d.cts.map +0 -1
  463. package/dist/once-txoW63yJ.mjs +0 -2
  464. package/dist/once-txoW63yJ.mjs.map +0 -1
  465. package/dist/pick-CuXTvXaw.mjs +0 -2
  466. package/dist/pick-CuXTvXaw.mjs.map +0 -1
  467. package/dist/pick-DXREvZBr.d.cts +0 -22
  468. package/dist/pick-DXREvZBr.d.cts.map +0 -1
  469. package/dist/pick-GDOwAh6I.cjs +0 -1
  470. package/dist/pick-ZrWD4de2.d.mts +0 -22
  471. package/dist/pick-ZrWD4de2.d.mts.map +0 -1
  472. package/dist/remove-accents-BFmyvTRZ.mjs +0 -2
  473. package/dist/remove-accents-BFmyvTRZ.mjs.map +0 -1
  474. package/dist/remove-accents-C4C0A2ex.d.mts +0 -12
  475. package/dist/remove-accents-C4C0A2ex.d.mts.map +0 -1
  476. package/dist/remove-accents-CXBUC-Id.cjs +0 -1
  477. package/dist/remove-accents-Yo3-2jWO.d.cts +0 -12
  478. package/dist/remove-accents-Yo3-2jWO.d.cts.map +0 -1
  479. package/dist/remove-empty-items-BglsRCyG.d.cts +0 -11
  480. package/dist/remove-empty-items-BglsRCyG.d.cts.map +0 -1
  481. package/dist/remove-empty-items-BzI9Vid9.mjs +0 -2
  482. package/dist/remove-empty-items-BzI9Vid9.mjs.map +0 -1
  483. package/dist/remove-empty-items-COwdCPHC.d.mts +0 -11
  484. package/dist/remove-empty-items-COwdCPHC.d.mts.map +0 -1
  485. package/dist/remove-empty-items-CjTxJuyS.cjs +0 -1
  486. package/dist/semaphore-4zJqtox8.mjs +0 -2
  487. package/dist/semaphore-4zJqtox8.mjs.map +0 -1
  488. package/dist/semaphore-CsGTxqsW.d.cts +0 -86
  489. package/dist/semaphore-CsGTxqsW.d.cts.map +0 -1
  490. package/dist/semaphore-DkHqPlow.cjs +0 -1
  491. package/dist/semaphore-WaZBtCk5.d.mts +0 -86
  492. package/dist/semaphore-WaZBtCk5.d.mts.map +0 -1
  493. package/dist/set-field-CUgbKEjW.mjs +0 -2
  494. package/dist/set-field-CUgbKEjW.mjs.map +0 -1
  495. package/dist/set-field-CcCiXZNl.d.cts +0 -16
  496. package/dist/set-field-CcCiXZNl.d.cts.map +0 -1
  497. package/dist/set-field-DyvXgpNP.d.mts +0 -16
  498. package/dist/set-field-DyvXgpNP.d.mts.map +0 -1
  499. package/dist/set-field-mr4GkhFb.cjs +0 -1
  500. package/dist/throttle-BOKOTo3m.cjs +0 -1
  501. package/dist/throttle-BWPQuZty.d.cts +0 -32
  502. package/dist/throttle-BWPQuZty.d.cts.map +0 -1
  503. package/dist/throttle-BgU4k6qs.d.mts +0 -32
  504. package/dist/throttle-BgU4k6qs.d.mts.map +0 -1
  505. package/dist/throttle-CYK3F0mZ.mjs +0 -2
  506. package/dist/throttle-CYK3F0mZ.mjs.map +0 -1
  507. package/dist/timeout-43rG9ETK.mjs +0 -2
  508. package/dist/timeout-43rG9ETK.mjs.map +0 -1
  509. package/dist/timeout-CLhwG-oo.d.mts +0 -12
  510. package/dist/timeout-CLhwG-oo.d.mts.map +0 -1
  511. package/dist/timeout-CoYbhliP.cjs +0 -1
  512. package/dist/timeout-DC38jHR8.d.cts +0 -12
  513. package/dist/timeout-DC38jHR8.d.cts.map +0 -1
  514. package/dist/to-deep-key-Cma9aiEz.cjs +0 -1
  515. package/dist/to-deep-key-D8uDBd6T.mjs +0 -2
  516. package/dist/to-deep-key-D8uDBd6T.mjs.map +0 -1
  517. package/dist/to-deep-key-DO-Z0Zjs.d.mts +0 -42
  518. package/dist/to-deep-key-DO-Z0Zjs.d.mts.map +0 -1
  519. package/dist/to-deep-key-DlsE4ziE.d.cts +0 -42
  520. package/dist/to-deep-key-DlsE4ziE.d.cts.map +0 -1
  521. package/dist/to-path-BajxeMmo.d.mts +0 -24
  522. package/dist/to-path-BajxeMmo.d.mts.map +0 -1
  523. package/dist/to-path-CdOFd4od.cjs +0 -1
  524. package/dist/to-path-D2zWXeYc.d.cts +0 -24
  525. package/dist/to-path-D2zWXeYc.d.cts.map +0 -1
  526. package/dist/to-path-Dm1fe-Ix.mjs +0 -2
  527. package/dist/to-path-Dm1fe-Ix.mjs.map +0 -1
  528. package/dist/unflatten-object-C7TE8J80.mjs +0 -2
  529. package/dist/unflatten-object-C7TE8J80.mjs.map +0 -1
  530. package/dist/unflatten-object-CPJIUozj.d.mts +0 -35
  531. package/dist/unflatten-object-CPJIUozj.d.mts.map +0 -1
  532. package/dist/unflatten-object-CvZj41LG.cjs +0 -1
  533. package/dist/unflatten-object-Cvbj7Q__.d.cts +0 -35
  534. package/dist/unflatten-object-Cvbj7Q__.d.cts.map +0 -1
  535. package/dist/union-BMOMEzO-.d.cts +0 -24
  536. package/dist/union-BMOMEzO-.d.cts.map +0 -1
  537. package/dist/union-C-2CRoFc.mjs +0 -2
  538. package/dist/union-C-2CRoFc.mjs.map +0 -1
  539. package/dist/union-D4bbjM2i.d.mts +0 -24
  540. package/dist/union-D4bbjM2i.d.mts.map +0 -1
  541. package/dist/union-EwdcZzNT.cjs +0 -1
  542. package/dist/with-timeout-BPaAIZtS.d.cts +0 -24
  543. package/dist/with-timeout-BPaAIZtS.d.cts.map +0 -1
  544. package/dist/with-timeout-BoZYdcOg.d.mts +0 -24
  545. package/dist/with-timeout-BoZYdcOg.d.mts.map +0 -1
  546. package/dist/with-timeout-CAuUr1ck.mjs +0 -2
  547. package/dist/with-timeout-CAuUr1ck.mjs.map +0 -1
  548. package/dist/with-timeout-CPUBGT4X.cjs +0 -1
package/dist/delay.d.mts CHANGED
@@ -1,2 +1,77 @@
1
- import { n as sleep, t as delay } from "./delay-Bd_sGzMj.mjs";
2
- export { delay, sleep };
1
+ //#region src/delay.d.ts
2
+ interface DelayOptions {
3
+ signal?: AbortSignal;
4
+ }
5
+ /**
6
+ * Delays the execution of code for a specified number of milliseconds.
7
+ *
8
+ * This function returns a Promise that resolves after the specified delay, allowing you to use it
9
+ * with async/await to pause execution.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * async function foo() {
14
+ * console.log('Start');
15
+ * await delay(1000); // Delays execution for 1 second
16
+ * console.log('End');
17
+ * }
18
+ *
19
+ * foo();
20
+ *
21
+ * // With AbortSignal
22
+ * const controller = new AbortController();
23
+ * const { signal } = controller;
24
+ *
25
+ * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms
26
+ * try {
27
+ * await delay(100, { signal });
28
+ * } catch (error) {
29
+ * console.error(error); // Will log 'AbortError'
30
+ * }
31
+ * }
32
+ * ```
33
+ *
34
+ * @param ms - The number of milliseconds to delay.
35
+ * @param options - The options object.
36
+ * @returns A Promise that resolves after the specified delay.
37
+ */
38
+ declare function delay(ms: number, {
39
+ signal
40
+ }?: DelayOptions): Promise<void>;
41
+ /**
42
+ * Delays the execution of code for a specified number of milliseconds.
43
+ *
44
+ * This function returns a Promise that resolves after the specified delay, allowing you to use it
45
+ * with async/await to pause execution.
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * async function foo() {
50
+ * console.log('Start');
51
+ * await sleep(1000); // Delays execution for 1 second
52
+ * console.log('End');
53
+ * }
54
+ *
55
+ * foo();
56
+ *
57
+ * // With AbortSignal
58
+ * const controller = new AbortController();
59
+ * const { signal } = controller;
60
+ *
61
+ * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms
62
+ * try {
63
+ * await sleep(100, { signal });
64
+ * } catch (error) {
65
+ * console.error(error); // Will log 'AbortError'
66
+ * }
67
+ * }
68
+ * ```
69
+ *
70
+ * @param ms - The number of milliseconds to sleep.
71
+ * @param options - The options object.
72
+ * @returns A Promise that resolves after the specified sleep.
73
+ */
74
+ declare function sleep(ms: number, options?: DelayOptions): Promise<void>;
75
+ //#endregion
76
+ export { delay, sleep };
77
+ //# sourceMappingURL=delay.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.d.mts","names":[],"sources":["../src/delay.ts"],"sourcesContent":[],"mappings":";UAoBU,YAAA;EAAA,MAAA,CAAA,EACC,WADW;AAqCtB;;;;;AA2DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA3DsB,KAAA;;IAER,eACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwDmB,KAAA,uBAA4B,eAAe"}
package/dist/delay.mjs CHANGED
@@ -1 +1,2 @@
1
- import{n as e,t}from"./delay-wdNbY6sk.mjs";export{t as delay,e as sleep};
1
+ import{AbortError as e}from"./errors.mjs";async function t(t,{signal:n}={}){return new Promise((r,i)=>{let a=()=>{i(new e)},o=()=>{clearTimeout(s),a()};if(n?.aborted)return a();let s=setTimeout(r,t);n?.addEventListener(`abort`,o,{once:!0})})}async function n(e,n){return t(e,n)}export{t as delay,n as sleep};
2
+ //# sourceMappingURL=delay.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.mjs","names":[],"sources":["../src/delay.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 { AbortError } from \"./errors\";\n\ninterface DelayOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Delays the execution of code for a specified number of milliseconds.\n *\n * This function returns a Promise that resolves after the specified delay, allowing you to use it\n * with async/await to pause execution.\n *\n * @example\n * ```typescript\n * async function foo() {\n * console.log('Start');\n * await delay(1000); // Delays execution for 1 second\n * console.log('End');\n * }\n *\n * foo();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const { signal } = controller;\n *\n * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms\n * try {\n * await delay(100, { signal });\n * } catch (error) {\n * console.error(error); // Will log 'AbortError'\n * }\n * }\n * ```\n *\n * @param ms - The number of milliseconds to delay.\n * @param options - The options object.\n * @returns A Promise that resolves after the specified delay.\n */\nexport async function delay(\n ms: number,\n { signal }: DelayOptions = {}\n): Promise<void> {\n return new Promise((resolve, reject) => {\n const abortError = () => {\n reject(new AbortError());\n };\n\n const abortHandler = () => {\n // eslint-disable-next-line ts/no-use-before-define\n clearTimeout(timeoutId);\n abortError();\n };\n\n if (signal?.aborted) {\n // eslint-disable-next-line no-promise-executor-return\n return abortError();\n }\n\n const timeoutId = setTimeout(resolve, ms);\n\n signal?.addEventListener(\"abort\", abortHandler, { once: true });\n });\n}\n\n/**\n * Delays the execution of code for a specified number of milliseconds.\n *\n * This function returns a Promise that resolves after the specified delay, allowing you to use it\n * with async/await to pause execution.\n *\n * @example\n * ```typescript\n * async function foo() {\n * console.log('Start');\n * await sleep(1000); // Delays execution for 1 second\n * console.log('End');\n * }\n *\n * foo();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const { signal } = controller;\n *\n * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms\n * try {\n * await sleep(100, { signal });\n * } catch (error) {\n * console.error(error); // Will log 'AbortError'\n * }\n * }\n * ```\n *\n * @param ms - The number of milliseconds to sleep.\n * @param options - The options object.\n * @returns A Promise that resolves after the specified sleep.\n */\nexport async function sleep(ms: number, options?: DelayOptions): Promise<void> {\n return delay(ms, options);\n}\n"],"mappings":"0CAyDA,eAAsB,EACpB,EACA,CAAE,UAAyB,EAAE,CACd,CACf,OAAO,IAAI,SAAS,EAAS,IAAW,CACtC,IAAM,MAAmB,CACvB,EAAO,IAAI,EAAa,EAGpB,MAAqB,CAEzB,aAAa,EAAU,CACvB,GAAY,EAGd,GAAI,GAAQ,QAEV,OAAO,GAAY,CAGrB,IAAM,EAAY,WAAW,EAAS,EAAG,CAEzC,GAAQ,iBAAiB,QAAS,EAAc,CAAE,KAAM,GAAM,CAAC,EAC/D,CAoCJ,eAAsB,EAAM,EAAY,EAAuC,CAC7E,OAAO,EAAM,EAAI,EAAQ"}
package/dist/errors.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./errors-BXYY8wXj.cjs`);exports.AbortError=e.t,exports.TimeoutError=e.n;
1
+ var e=class extends Error{constructor(e=`The operation was aborted`){super(e),this.name=`AbortError`}},t=class extends Error{constructor(e=`The operation was timed out`){super(e),this.name=`TimeoutError`}};exports.AbortError=e,exports.TimeoutError=t;
package/dist/errors.mjs CHANGED
@@ -1 +1,2 @@
1
- import{n as e,t}from"./errors-DWX9ET_b.mjs";export{t as AbortError,e as TimeoutError};
1
+ var e=class extends Error{constructor(e=`The operation was aborted`){super(e),this.name=`AbortError`}},t=class extends Error{constructor(e=`The operation was timed out`){super(e),this.name=`TimeoutError`}};export{e as AbortError,t as TimeoutError};
2
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","names":[],"sources":["../src/errors.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 * An error class representing an aborted operation.\n */\nexport class AbortError extends Error {\n constructor(message = \"The operation was aborted\") {\n super(message);\n this.name = \"AbortError\";\n }\n}\n\n/**\n * An error class representing an timeout operation.\n */\nexport class TimeoutError extends Error {\n constructor(message = \"The operation was timed out\") {\n super(message);\n this.name = \"TimeoutError\";\n }\n}\n"],"mappings":"AAqBA,IAAa,EAAb,cAAgC,KAAM,CACpC,YAAY,EAAU,4BAA6B,CACjD,MAAM,EAAQ,CACd,KAAK,KAAO,eAOH,EAAb,cAAkC,KAAM,CACtC,YAAY,EAAU,8BAA+B,CACnD,MAAM,EAAQ,CACd,KAAK,KAAO"}
@@ -1 +1 @@
1
- const e=require(`./filter-empty-5_nMg04e.cjs`);exports.filterEmpty=e.t;
1
+ const e=require(`./type-checks/src/is-empty.cjs`),t=(t=[])=>t.filter(t=>!e.isEmpty(t));exports.filterEmpty=t;
@@ -1,2 +1,5 @@
1
- import { t as filterEmpty } from "./filter-empty-C2fq9M7o.cjs";
2
- export { filterEmpty };
1
+ //#region src/filter-empty.d.ts
2
+ declare const filterEmpty: <T>(values?: (T | null | undefined)[]) => T[];
3
+ //#endregion
4
+ export { filterEmpty };
5
+ //# sourceMappingURL=filter-empty.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-empty.d.cts","names":[],"sources":["../src/filter-empty.ts"],"sourcesContent":[],"mappings":";cAmBa,2BAA2B,4BAA+B"}
@@ -1,2 +1,5 @@
1
- import { t as filterEmpty } from "./filter-empty-BMtd0K07.mjs";
2
- export { filterEmpty };
1
+ //#region src/filter-empty.d.ts
2
+ declare const filterEmpty: <T>(values?: (T | null | undefined)[]) => T[];
3
+ //#endregion
4
+ export { filterEmpty };
5
+ //# sourceMappingURL=filter-empty.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-empty.d.mts","names":[],"sources":["../src/filter-empty.ts"],"sourcesContent":[],"mappings":";cAmBa,2BAA2B,4BAA+B"}
@@ -1 +1,2 @@
1
- import{t as e}from"./filter-empty-Dsc1ymCj.mjs";export{e as filterEmpty};
1
+ import{isEmpty as e}from"./type-checks/src/is-empty.mjs";const t=(t=[])=>t.filter(t=>!e(t));export{t as filterEmpty};
2
+ //# sourceMappingURL=filter-empty.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-empty.mjs","names":[],"sources":["../src/filter-empty.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\nimport { isEmpty } from \"@stryke/type-checks/is-empty\";\n\nexport const filterEmpty = <T>(values: (T | null | undefined)[] = []): T[] =>\n values.filter(value => !isEmpty(value)) as T[];\n"],"mappings":"yDAmBA,MAAa,GAAkB,EAAmC,EAAE,GAClE,EAAO,OAAO,GAAS,CAAC,EAAQ,EAAM,CAAC"}
@@ -1 +1 @@
1
- const e=require(`./flatten-object-D-EbEZqR.cjs`);exports.flattenObject=e.t;
1
+ const e=require(`./type-checks/src/is-plain-object.cjs`);function t(e){return n(e)}function n(t,r=``){let i={},a=Object.keys(t);for(let o of a){let a=t[o],s=r?`${r}.${o}`:o;if(e.isPlainObject(a)&&Object.keys(a).length>0)Object.assign(i,n(a,s));else if(Array.isArray(a))for(let[e,t]of a.entries())i[`${s}.${e}`]=t;else i[s]=a}return i}exports.flattenObject=t;
@@ -1,2 +1,35 @@
1
- import { t as flattenObject } from "./flatten-object-DjaJJaY0.cjs";
2
- export { flattenObject };
1
+ import { DeepKey, DeepValue } from "./types/src/object.cjs";
2
+
3
+ //#region src/flatten-object.d.ts
4
+
5
+ /**
6
+ * Flattens a nested object into a single level object with dot-separated keys.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const nestedObject = {
11
+ * a: {
12
+ * b: {
13
+ * c: 1
14
+ * }
15
+ * },
16
+ * d: [2, 3]
17
+ * };
18
+ *
19
+ * const flattened = flattenObject(nestedObject);
20
+ * console.log(flattened);
21
+ * // Output:
22
+ * // {
23
+ * // 'a.b.c': 1,
24
+ * // 'd.0': 2,
25
+ * // 'd.1': 3
26
+ * // }
27
+ * ```
28
+ *
29
+ * @param object - The object to flatten.
30
+ * @returns - The flattened object.
31
+ */
32
+ declare function flattenObject<TObject extends Record<string, any> = Record<string, any>, TDeepKeyObject extends { [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey> } = { [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey> }>(object: TObject): TDeepKeyObject;
33
+ //#endregion
34
+ export { flattenObject };
35
+ //# sourceMappingURL=flatten-object.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-object.d.cts","names":[],"sources":["../src/flatten-object.ts"],"sourcesContent":[],"mappings":";;;;;;AA+CA;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,8BACE,sBAAsB,uDAE3B,QAAQ,WAAW,UAAU,SAAS,qBAClC,QAAQ,WAAW,UAAU,SAAS,iBAC7C,UAAU"}
@@ -1,2 +1,35 @@
1
- import { t as flattenObject } from "./flatten-object-Bk2VT-b2.mjs";
2
- export { flattenObject };
1
+ import { DeepKey, DeepValue } from "./types/src/object.mjs";
2
+
3
+ //#region src/flatten-object.d.ts
4
+
5
+ /**
6
+ * Flattens a nested object into a single level object with dot-separated keys.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const nestedObject = {
11
+ * a: {
12
+ * b: {
13
+ * c: 1
14
+ * }
15
+ * },
16
+ * d: [2, 3]
17
+ * };
18
+ *
19
+ * const flattened = flattenObject(nestedObject);
20
+ * console.log(flattened);
21
+ * // Output:
22
+ * // {
23
+ * // 'a.b.c': 1,
24
+ * // 'd.0': 2,
25
+ * // 'd.1': 3
26
+ * // }
27
+ * ```
28
+ *
29
+ * @param object - The object to flatten.
30
+ * @returns - The flattened object.
31
+ */
32
+ declare function flattenObject<TObject extends Record<string, any> = Record<string, any>, TDeepKeyObject extends { [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey> } = { [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey> }>(object: TObject): TDeepKeyObject;
33
+ //#endregion
34
+ export { flattenObject };
35
+ //# sourceMappingURL=flatten-object.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-object.d.mts","names":[],"sources":["../src/flatten-object.ts"],"sourcesContent":[],"mappings":";;;;;;AA+CA;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,8BACE,sBAAsB,uDAE3B,QAAQ,WAAW,UAAU,SAAS,qBAClC,QAAQ,WAAW,UAAU,SAAS,iBAC7C,UAAU"}
@@ -1 +1,2 @@
1
- import{t as e}from"./flatten-object-DFCZmly9.mjs";export{e as flattenObject};
1
+ import{isPlainObject as e}from"./type-checks/src/is-plain-object.mjs";function t(e){return n(e)}function n(t,r=``){let i={},a=Object.keys(t);for(let o of a){let a=t[o],s=r?`${r}.${o}`:o;if(e(a)&&Object.keys(a).length>0)Object.assign(i,n(a,s));else if(Array.isArray(a))for(let[e,t]of a.entries())i[`${s}.${e}`]=t;else i[s]=a}return i}export{t as flattenObject};
2
+ //# sourceMappingURL=flatten-object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-object.mjs","names":[],"sources":["../src/flatten-object.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\nimport { isPlainObject } from \"@stryke/type-checks/is-plain-object\";\nimport type { DeepKey, DeepValue } from \"@stryke/types/object\";\n\n/**\n * Flattens a nested object into a single level object with dot-separated keys.\n *\n * @example\n * ```typescript\n * const nestedObject = {\n * a: {\n * b: {\n * c: 1\n * }\n * },\n * d: [2, 3]\n * };\n *\n * const flattened = flattenObject(nestedObject);\n * console.log(flattened);\n * // Output:\n * // {\n * // 'a.b.c': 1,\n * // 'd.0': 2,\n * // 'd.1': 3\n * // }\n * ```\n *\n * @param object - The object to flatten.\n * @returns - The flattened object.\n */\nexport function flattenObject<\n TObject extends Record<string, any> = Record<string, any>,\n TDeepKeyObject extends {\n [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey>;\n } = { [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey> }\n>(object: TObject): TDeepKeyObject {\n return flattenObjectImpl<TObject, TDeepKeyObject>(object);\n}\n\nfunction flattenObjectImpl<\n TObject extends Record<string, any> = Record<string, any>,\n TDeepKeyObject extends {\n [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey>;\n } = { [TKey in DeepKey<TObject>]: DeepValue<TObject, TKey> }\n>(object: TObject, prefix = \"\"): TDeepKeyObject {\n const result = {} as TDeepKeyObject;\n const keys = Object.keys(object);\n\n for (const key of keys) {\n const value = (object as any)[key];\n\n const prefixedKey = prefix ? `${prefix}.${key}` : key;\n\n if (isPlainObject(value) && Object.keys(value).length > 0) {\n Object.assign(\n result,\n flattenObjectImpl<typeof value>(value, prefixedKey)\n );\n } else if (Array.isArray(value)) {\n for (const [index, element_] of value.entries()) {\n (result as any)[`${prefixedKey}.${index}` as DeepKey<TObject>] =\n element_;\n }\n } else {\n (result as any)[prefixedKey as DeepKey<TObject>] = value;\n }\n }\n\n return result;\n}\n"],"mappings":"sEA+CA,SAAgB,EAKd,EAAiC,CACjC,OAAO,EAA2C,EAAO,CAG3D,SAAS,EAKP,EAAiB,EAAS,GAAoB,CAC9C,IAAM,EAAS,EAAE,CACX,EAAO,OAAO,KAAK,EAAO,CAEhC,IAAK,IAAM,KAAO,EAAM,CACtB,IAAM,EAAS,EAAe,GAExB,EAAc,EAAS,GAAG,EAAO,GAAG,IAAQ,EAElD,GAAI,EAAc,EAAM,EAAI,OAAO,KAAK,EAAM,CAAC,OAAS,EACtD,OAAO,OACL,EACA,EAAgC,EAAO,EAAY,CACpD,SACQ,MAAM,QAAQ,EAAM,CAC7B,IAAK,GAAM,CAAC,EAAO,KAAa,EAAM,SAAS,CAC5C,EAAe,GAAG,EAAY,GAAG,KAChC,OAGH,EAAe,GAAmC,EAIvD,OAAO"}
@@ -1 +1 @@
1
- const e=require(`./get-field-D4F_p-Ov.cjs`);require(`./to-path-CdOFd4od.cjs`),exports.getField=e.t;
1
+ const e=require(`./type-checks/src/is-number.cjs`),t=require(`./convert/src/to-string-key.cjs`),n=require(`./type-checks/src/is-deep-key.cjs`),r=require(`./to-path.cjs`);function i(o,s,c){if(o===null)return c;switch(typeof s){case`string`:{let e=o[s];return e===void 0?n.isDeepKey(s)?i(o,r.toPath(s),c):c:e}case`number`:case`symbol`:{e.isNumber(s)&&(s=t.toStringKey(s));let n=Array.isArray(s)?void 0:o[s];return n===void 0?c:n}default:{if(Array.isArray(s))return a(o,s,c);s=Object.is(s?.valueOf(),-0)?`-0`:String(s);let e=o[s];return e===void 0?c:e}}}function a(e,t,n){if(t.length===0)return n;let r=e;for(let e of t){if(r===null)return n;r=r[e]}return r===void 0?n:r}exports.getField=i;
@@ -1,2 +1,254 @@
1
- import { n as getField, t as GetField } from "./get-field-oltWWNRO.cjs";
2
- export { GetField, getField };
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, getField };
254
+ //# sourceMappingURL=get-field.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-field.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,EAAA,SAAA,CAAA;KAeC,iCAfC,CAAA,CAAA,EAAA,GAAA,CAAA,GAgBF,eAhBE,CAgBc,OAhBd,CAgBsB,CAhBtB,EAAA,SAAA,CAAA,EAgBqC,GAhBrC,CAAA,GAiBF,OAjBE,CAiBM,CAjBN,EAAA,SAAA,CAAA;AACF,KAkBQ,QAlBR,CAAA,CAAA,EAAA,CAAA,CAAA,GAkByB,CAlBzB,SAAA,GAAA,KAAA,KAAA,IAAA,KAAA,MAAA,EAAA,GAAA,IAAA,SAAA,MAmBmB,OAnBnB,CAmB2B,CAnB3B,EAAA,SAAA,CAAA,GAqBM,0BArBN,CAqBiC,OArBjC,CAqByC,CArBzC,EAAA,SAAA,CAAA,CAqBuD,IArBvD,CAA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