@design-edito/tools 0.4.23 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/agnostic/arrays/find-duplicates/index.d.ts +1 -1
  2. package/agnostic/arrays/find-duplicates/index.js +3 -2
  3. package/agnostic/arrays/is-array-of/index.d.ts +1 -1
  4. package/agnostic/arrays/is-array-of/index.js +3 -1
  5. package/agnostic/arrays/make/index.d.ts +1 -1
  6. package/agnostic/arrays/random-pick/index.js +2 -1
  7. package/agnostic/arrays/shuffle/index.js +1 -1
  8. package/agnostic/booleans/is-falsy/index.d.ts +3 -3
  9. package/agnostic/booleans/is-falsy/index.js +2 -3
  10. package/agnostic/colors/channels/index.d.ts +16 -16
  11. package/agnostic/colors/channels/index.js +15 -15
  12. package/agnostic/colors/contrast/index.d.ts +6 -6
  13. package/agnostic/colors/contrast/index.js +6 -8
  14. package/agnostic/colors/contrast/index.test.js +1 -1
  15. package/agnostic/colors/convert/index.d.ts +43 -43
  16. package/agnostic/colors/convert/index.js +60 -55
  17. package/agnostic/colors/distance/index.d.ts +5 -5
  18. package/agnostic/colors/distance/index.js +5 -4
  19. package/agnostic/colors/grayscale/index.d.ts +3 -3
  20. package/agnostic/colors/grayscale/index.js +3 -3
  21. package/agnostic/colors/index.d.ts +3 -3
  22. package/agnostic/colors/index.js +3 -3
  23. package/agnostic/colors/invert/index.d.ts +4 -4
  24. package/agnostic/colors/invert/index.js +3 -3
  25. package/agnostic/colors/lerp/index.d.ts +6 -7
  26. package/agnostic/colors/lerp/index.js +5 -6
  27. package/agnostic/colors/luminance/index.d.ts +4 -4
  28. package/agnostic/colors/luminance/index.js +3 -3
  29. package/agnostic/colors/palette/index.d.ts +3 -3
  30. package/agnostic/colors/palette/index.js +4 -3
  31. package/agnostic/colors/rotate/index.d.ts +4 -4
  32. package/agnostic/colors/rotate/index.js +4 -4
  33. package/agnostic/colors/tidy/index.d.ts +2 -2
  34. package/agnostic/colors/tidy/index.js +2 -2
  35. package/agnostic/colors/typechecks/index.d.ts +21 -21
  36. package/agnostic/colors/typechecks/index.js +22 -21
  37. package/agnostic/colors/types.d.ts +33 -33
  38. package/agnostic/css/bem/index.d.ts +11 -11
  39. package/agnostic/css/bem/index.js +9 -8
  40. package/agnostic/css/clss/index.d.ts +1 -1
  41. package/agnostic/css/clss/index.js +1 -1
  42. package/agnostic/css/index.d.ts +1 -1
  43. package/agnostic/css/index.js +1 -1
  44. package/agnostic/css/is-valid-css-class-name/index.d.ts +2 -2
  45. package/agnostic/css/is-valid-css-class-name/index.js +3 -3
  46. package/agnostic/css/scale/index.d.ts +18 -18
  47. package/agnostic/css/scale/index.js +18 -18
  48. package/agnostic/css/styles-set/index.d.ts +1 -1
  49. package/agnostic/css/styles-set/index.js +0 -2
  50. package/agnostic/errors/register/index.d.ts +1 -1
  51. package/agnostic/errors/register/index.js +3 -0
  52. package/agnostic/errors/unknown-to-string/index.d.ts +2 -2
  53. package/agnostic/errors/unknown-to-string/index.js +2 -3
  54. package/agnostic/html/deep-select/index.d.ts +3 -3
  55. package/agnostic/html/deep-select/index.js +11 -7
  56. package/agnostic/html/get-node-ancestors/index.d.ts +3 -3
  57. package/agnostic/html/get-node-ancestors/index.js +3 -3
  58. package/agnostic/html/get-position-inside-parent/index.d.ts +2 -2
  59. package/agnostic/html/get-position-inside-parent/index.js +2 -2
  60. package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
  61. package/agnostic/html/hyper-json/cast/index.js +6 -5
  62. package/agnostic/html/hyper-json/method/index.d.ts +2 -2
  63. package/agnostic/html/hyper-json/serialize/index.d.ts +1 -1
  64. package/agnostic/html/hyper-json/serialize/index.js +9 -5
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +1 -0
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +1 -1
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +1 -1
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +1 -0
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +1 -1
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +1 -0
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +1 -1
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +1 -1
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +1 -1
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +1 -1
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +0 -1
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +1 -1
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +1 -0
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +1 -1
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +1 -1
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +1 -2
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.d.ts +1 -1
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.d.ts +1 -1
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.js +4 -0
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +1 -1
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +1 -0
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +6 -6
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +6 -6
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +1 -1
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +1 -0
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +1 -1
  91. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +1 -1
  92. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +1 -1
  93. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +1 -1
  94. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +1 -1
  95. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +1 -1
  96. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +1 -0
  97. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +1 -1
  98. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +2 -0
  99. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +1 -1
  100. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +1 -1
  101. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +1 -0
  102. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +1 -1
  103. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +3 -0
  104. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +1 -0
  105. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +1 -1
  106. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +1 -0
  107. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +1 -1
  108. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +1 -0
  109. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +1 -0
  110. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +1 -1
  111. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +1 -0
  112. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +3 -0
  113. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +1 -1
  114. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +4 -2
  115. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +1 -1
  116. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +5 -0
  117. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.d.ts +1 -1
  118. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +1 -0
  119. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +1 -1
  120. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +1 -1
  121. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +1 -1
  122. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +3 -2
  123. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +1 -1
  124. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +1 -1
  125. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +1 -1
  126. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +1 -1
  127. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +1 -1
  128. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +1 -1
  129. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +1 -1
  130. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +1 -1
  131. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +1 -1
  132. package/agnostic/html/hyper-json/smart-tags/index.d.ts +1 -1
  133. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +1 -1
  134. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +1 -1
  135. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +1 -1
  136. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +1 -1
  137. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +3 -1
  138. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +2 -2
  139. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +2 -2
  140. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +1 -1
  141. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +1 -0
  142. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +1 -1
  143. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +1 -1
  144. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +1 -1
  145. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +3 -1
  146. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +2 -2
  147. package/agnostic/html/hyper-json/transformer/index.d.ts +5 -5
  148. package/agnostic/html/hyper-json/tree/index.d.ts +1 -1
  149. package/agnostic/html/hyper-json/tree/index.js +14 -8
  150. package/agnostic/html/hyper-json/types/index.d.ts +11 -11
  151. package/agnostic/html/hyper-json/utils/index.d.ts +3 -3
  152. package/agnostic/html/hyper-json/utils/index.js +8 -3
  153. package/agnostic/html/index.d.ts +4 -4
  154. package/agnostic/html/index.js +4 -4
  155. package/agnostic/html/insert-node/index.d.ts +4 -4
  156. package/agnostic/html/insert-node/index.js +4 -4
  157. package/agnostic/html/replace-in-element/index.d.ts +3 -3
  158. package/agnostic/html/replace-in-element/index.js +4 -4
  159. package/agnostic/html/selector-to-element/index.d.ts +2 -2
  160. package/agnostic/html/selector-to-element/index.js +11 -11
  161. package/agnostic/html/string-to-nodes/index.d.ts +3 -3
  162. package/agnostic/html/string-to-nodes/index.js +3 -3
  163. package/agnostic/html/watch-selection/index.d.ts +4 -5
  164. package/agnostic/html/watch-selection/index.js +5 -6
  165. package/agnostic/misc/assert/index.js +3 -1
  166. package/agnostic/misc/cast/index.d.ts +16 -16
  167. package/agnostic/misc/cast/index.js +18 -18
  168. package/agnostic/misc/connection/index.d.ts +5 -5
  169. package/agnostic/misc/connection/index.js +4 -2
  170. package/agnostic/misc/crawler/index.d.ts +18 -18
  171. package/agnostic/misc/crawler/index.js +10 -9
  172. package/agnostic/misc/crawler/index.test.js +2 -2
  173. package/agnostic/misc/crossenv/detect-runtime/index.d.ts +1 -1
  174. package/agnostic/misc/crossenv/detect-runtime/index.js +10 -11
  175. package/agnostic/misc/crossenv/window/index.d.ts +6 -6
  176. package/agnostic/misc/crossenv/window/index.js +6 -5
  177. package/agnostic/misc/data-size/index.js +2 -0
  178. package/agnostic/misc/index.d.ts +2 -2
  179. package/agnostic/misc/index.js +2 -2
  180. package/agnostic/misc/is-constructor-function/index.d.ts +2 -2
  181. package/agnostic/misc/is-constructor-function/index.js +3 -2
  182. package/agnostic/misc/is-constructor-function/index.test.js +2 -2
  183. package/agnostic/misc/is-nullish/index.d.ts +5 -5
  184. package/agnostic/misc/is-nullish/index.js +5 -4
  185. package/agnostic/misc/logs/index.d.ts +1 -1
  186. package/agnostic/misc/logs/index.js +1 -1
  187. package/agnostic/misc/logs/logger/index.js +2 -2
  188. package/agnostic/misc/lorem-ipsum/index.js +4 -4
  189. package/agnostic/misc/normalize-extension/index.d.ts +3 -3
  190. package/agnostic/misc/normalize-extension/index.js +4 -4
  191. package/agnostic/misc/outcome/index.d.ts +14 -14
  192. package/agnostic/misc/outcome/index.js +6 -4
  193. package/agnostic/numbers/absolute-modulo/index.d.ts +3 -3
  194. package/agnostic/numbers/absolute-modulo/index.js +3 -3
  195. package/agnostic/numbers/approximate-rational/index.d.ts +6 -6
  196. package/agnostic/numbers/approximate-rational/index.js +9 -9
  197. package/agnostic/numbers/clamp/index.d.ts +4 -4
  198. package/agnostic/numbers/clamp/index.js +4 -4
  199. package/agnostic/numbers/geometric-progressions/index.d.ts +5 -5
  200. package/agnostic/numbers/geometric-progressions/index.js +7 -5
  201. package/agnostic/numbers/geometric-progressions/index.test.js +2 -2
  202. package/agnostic/numbers/index.d.ts +1 -1
  203. package/agnostic/numbers/index.js +1 -1
  204. package/agnostic/numbers/interpolate/index.d.ts +8 -8
  205. package/agnostic/numbers/interpolate/index.js +8 -8
  206. package/agnostic/numbers/round/index.d.ts +9 -9
  207. package/agnostic/numbers/round/index.js +9 -9
  208. package/agnostic/objects/deep-get-property/index.d.ts +4 -4
  209. package/agnostic/objects/deep-get-property/index.js +3 -3
  210. package/agnostic/objects/enums/is-in-enum/index.d.ts +3 -3
  211. package/agnostic/objects/enums/is-in-enum/index.js +3 -3
  212. package/agnostic/objects/flatten-getters/index.d.ts +2 -2
  213. package/agnostic/objects/flatten-getters/index.js +3 -2
  214. package/agnostic/objects/index.d.ts +2 -2
  215. package/agnostic/objects/index.js +2 -2
  216. package/agnostic/objects/is-object/index.d.ts +4 -4
  217. package/agnostic/objects/is-object/index.js +4 -4
  218. package/agnostic/objects/is-record/index.d.ts +2 -2
  219. package/agnostic/objects/is-record/index.js +2 -2
  220. package/agnostic/objects/record-format/index.d.ts +9 -9
  221. package/agnostic/objects/record-format/index.js +8 -3
  222. package/agnostic/objects/record-map/index.d.ts +4 -4
  223. package/agnostic/objects/record-map/index.js +5 -3
  224. package/agnostic/objects/sort-keys/index.d.ts +3 -3
  225. package/agnostic/objects/sort-keys/index.js +4 -3
  226. package/agnostic/objects/validation/index.d.ts +3 -3
  227. package/agnostic/objects/validation/index.js +4 -3
  228. package/agnostic/optim/memoize/index.d.ts +2 -2
  229. package/agnostic/optim/memoize/index.js +4 -2
  230. package/agnostic/optim/throttle-debounce/index.d.ts +2 -2
  231. package/agnostic/optim/throttle-debounce/index.js +7 -6
  232. package/agnostic/optim/throttle-debounce/types.d.ts +2 -1
  233. package/agnostic/random/random/index.d.ts +7 -8
  234. package/agnostic/random/random/index.js +3 -3
  235. package/agnostic/random/uuid/index.d.ts +6 -6
  236. package/agnostic/random/uuid/index.js +6 -6
  237. package/agnostic/regexps/index.d.ts +30 -60
  238. package/agnostic/regexps/index.js +27 -26
  239. package/agnostic/sanitization/file-name/index.d.ts +3 -3
  240. package/agnostic/sanitization/file-name/index.js +10 -10
  241. package/agnostic/sanitization/html/index.d.ts +6 -6
  242. package/agnostic/sanitization/html/index.js +9 -6
  243. package/agnostic/sanitization/index.d.ts +1 -1
  244. package/agnostic/sanitization/index.js +1 -1
  245. package/agnostic/sanitization/path/index.d.ts +2 -2
  246. package/agnostic/sanitization/path/index.js +2 -2
  247. package/agnostic/sanitization/user-input/index.js +1 -0
  248. package/agnostic/strings/char-codes/index.js +2 -6
  249. package/agnostic/strings/index.d.ts +1 -1
  250. package/agnostic/strings/index.js +1 -1
  251. package/agnostic/strings/normalize-indent/index.js +2 -2
  252. package/agnostic/strings/parse-table/index.d.ts +13 -13
  253. package/agnostic/strings/parse-table/index.js +31 -16
  254. package/agnostic/strings/replace-all/index.d.ts +1 -1
  255. package/agnostic/strings/replace-all/index.js +1 -0
  256. package/agnostic/strings/to-alphanum/index.js +2 -2
  257. package/agnostic/strings/trim/index.js +2 -2
  258. package/agnostic/time/dates/format-date/index.js +3 -1
  259. package/agnostic/time/dates/index.d.ts +1 -0
  260. package/agnostic/time/dates/index.js +1 -0
  261. package/agnostic/time/dates/to-french-republican/index.d.ts +16 -0
  262. package/agnostic/time/dates/to-french-republican/index.js +82 -0
  263. package/agnostic/time/dates/to-french-republican/index.test.d.ts +1 -0
  264. package/agnostic/time/dates/to-french-republican/index.test.js +112 -0
  265. package/agnostic/time/dates/to-french-republican/types.d.ts +91 -0
  266. package/agnostic/time/dates/to-french-republican/types.js +47 -0
  267. package/agnostic/time/dates/to-french-republican/utils.d.ts +32 -0
  268. package/agnostic/time/dates/to-french-republican/utils.js +155 -0
  269. package/agnostic/time/duration/index.js +2 -0
  270. package/agnostic/time/index.d.ts +2 -2
  271. package/agnostic/time/index.js +2 -2
  272. package/agnostic/time/timeout/index.js +9 -9
  273. package/agnostic/time/transitions/index.js +8 -7
  274. package/components/BeforeAfter/index.controlled.js +1 -0
  275. package/components/BeforeAfter/index.js +4 -0
  276. package/components/Button/index.d.ts +1 -1
  277. package/components/Clippable/index.js +1 -0
  278. package/components/Drawer/index.js +1 -1
  279. package/components/Gallery/index.js +2 -1
  280. package/components/Gallery/utils.js +5 -1
  281. package/components/Iframe/index.js +3 -0
  282. package/components/Image/index.js +2 -0
  283. package/components/Input/index.controlled.js +3 -2
  284. package/components/IntersectionObserver/index.js +5 -2
  285. package/components/JsonEditor/index.js +1 -1
  286. package/components/Overlayer/index.d.ts +1 -1
  287. package/components/ScrollListener/utils.d.ts +29 -0
  288. package/components/Select/index.controlled.js +3 -2
  289. package/components/Sequencer/index.controlled.js +1 -1
  290. package/components/Subtitles/index.js +3 -1
  291. package/components/Subtitles/types.d.ts +14 -0
  292. package/components/Subtitles/utils.d.ts +19 -15
  293. package/components/Subtitles/utils.js +29 -24
  294. package/components/Textarea/index.controlled.js +3 -2
  295. package/components/UIModule/index.js +3 -1
  296. package/components/Video/index.controlled.d.ts +1 -1
  297. package/components/Video/index.controlled.js +11 -10
  298. package/components/Video/index.js +27 -20
  299. package/components/Video/utils.d.ts +1 -1
  300. package/components/Video/utils.js +11 -2
  301. package/components/index.d.ts +2 -2
  302. package/components/index.js +2 -2
  303. package/components/utils/types.d.ts +5 -0
  304. package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +9 -9
  305. package/node/@aws-s3/storage/directory/copy-dir/index.js +15 -12
  306. package/node/@aws-s3/storage/directory/list/index.d.ts +5 -5
  307. package/node/@aws-s3/storage/directory/list/index.js +5 -5
  308. package/node/@aws-s3/storage/directory/move-dir/index.d.ts +6 -6
  309. package/node/@aws-s3/storage/directory/move-dir/index.js +11 -7
  310. package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +5 -5
  311. package/node/@aws-s3/storage/directory/remove-dir/index.js +5 -5
  312. package/node/@aws-s3/storage/file/copy/index.d.ts +8 -8
  313. package/node/@aws-s3/storage/file/copy/index.js +12 -9
  314. package/node/@aws-s3/storage/file/download/index.d.ts +6 -6
  315. package/node/@aws-s3/storage/file/download/index.js +6 -5
  316. package/node/@aws-s3/storage/file/exists/index.d.ts +6 -6
  317. package/node/@aws-s3/storage/file/exists/index.js +15 -12
  318. package/node/@aws-s3/storage/file/move/index.d.ts +9 -9
  319. package/node/@aws-s3/storage/file/move/index.js +18 -15
  320. package/node/@aws-s3/storage/file/remove/index.d.ts +5 -5
  321. package/node/@aws-s3/storage/file/remove/index.js +16 -11
  322. package/node/@aws-s3/storage/file/stat/index.d.ts +5 -5
  323. package/node/@aws-s3/storage/file/stat/index.js +10 -7
  324. package/node/@aws-s3/storage/file/upload/index.d.ts +7 -7
  325. package/node/@aws-s3/storage/file/upload/index.js +11 -9
  326. package/node/@express/@multer/index.d.ts +12 -12
  327. package/node/@express/@multer/index.js +27 -25
  328. package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +4 -4
  329. package/node/@google-cloud/storage/bucket/get-metadata/index.js +3 -3
  330. package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +7 -7
  331. package/node/@google-cloud/storage/directory/copy-dir/index.js +6 -6
  332. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  333. package/node/@google-cloud/storage/directory/index.js +1 -1
  334. package/node/@google-cloud/storage/directory/list/index.d.ts +6 -6
  335. package/node/@google-cloud/storage/directory/list/index.js +5 -5
  336. package/node/@google-cloud/storage/directory/move-dir/index.d.ts +6 -6
  337. package/node/@google-cloud/storage/directory/move-dir/index.js +5 -5
  338. package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +7 -7
  339. package/node/@google-cloud/storage/directory/remove-dir/index.js +6 -6
  340. package/node/@google-cloud/storage/file/copy/index.d.ts +9 -9
  341. package/node/@google-cloud/storage/file/copy/index.js +8 -8
  342. package/node/@google-cloud/storage/file/download/index.d.ts +7 -7
  343. package/node/@google-cloud/storage/file/download/index.js +5 -5
  344. package/node/@google-cloud/storage/file/exists/index.d.ts +7 -7
  345. package/node/@google-cloud/storage/file/exists/index.js +6 -6
  346. package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +7 -7
  347. package/node/@google-cloud/storage/file/generate-signed-url/index.js +6 -6
  348. package/node/@google-cloud/storage/file/get-metadata/index.d.ts +5 -5
  349. package/node/@google-cloud/storage/file/get-metadata/index.js +4 -4
  350. package/node/@google-cloud/storage/file/get-permissions/index.d.ts +6 -6
  351. package/node/@google-cloud/storage/file/get-permissions/index.js +4 -4
  352. package/node/@google-cloud/storage/file/index.d.ts +1 -1
  353. package/node/@google-cloud/storage/file/index.js +1 -1
  354. package/node/@google-cloud/storage/file/move/index.d.ts +10 -10
  355. package/node/@google-cloud/storage/file/move/index.js +9 -9
  356. package/node/@google-cloud/storage/file/remove/index.d.ts +5 -5
  357. package/node/@google-cloud/storage/file/remove/index.js +4 -4
  358. package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +5 -5
  359. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +5 -5
  360. package/node/@google-cloud/storage/file/stat/index.d.ts +5 -5
  361. package/node/@google-cloud/storage/file/stat/index.js +4 -4
  362. package/node/@google-cloud/storage/file/update-metadata/index.d.ts +7 -7
  363. package/node/@google-cloud/storage/file/update-metadata/index.js +5 -5
  364. package/node/@google-cloud/storage/file/upload/index.d.ts +7 -7
  365. package/node/@google-cloud/storage/file/upload/index.js +5 -5
  366. package/node/cloud-storage/clients/index.d.ts +8 -8
  367. package/node/cloud-storage/clients/index.js +8 -8
  368. package/node/cloud-storage/operations/copy-dir/index.d.ts +22 -22
  369. package/node/cloud-storage/operations/copy-dir/index.js +5 -5
  370. package/node/cloud-storage/operations/copy-file/index.d.ts +22 -22
  371. package/node/cloud-storage/operations/copy-file/index.js +5 -5
  372. package/node/cloud-storage/operations/download-file/index.d.ts +19 -19
  373. package/node/cloud-storage/operations/download-file/index.js +6 -6
  374. package/node/cloud-storage/operations/exists-file/index.d.ts +15 -26
  375. package/node/cloud-storage/operations/exists-file/index.js +4 -4
  376. package/node/cloud-storage/operations/list-dir/index.d.ts +15 -25
  377. package/node/cloud-storage/operations/list-dir/index.js +4 -4
  378. package/node/cloud-storage/operations/move-dir/index.d.ts +22 -22
  379. package/node/cloud-storage/operations/move-dir/index.js +5 -5
  380. package/node/cloud-storage/operations/move-file/index.d.ts +22 -22
  381. package/node/cloud-storage/operations/move-file/index.js +5 -5
  382. package/node/cloud-storage/operations/remove-dir/index.d.ts +18 -18
  383. package/node/cloud-storage/operations/remove-dir/index.js +4 -4
  384. package/node/cloud-storage/operations/remove-file/index.d.ts +18 -18
  385. package/node/cloud-storage/operations/remove-file/index.js +4 -4
  386. package/node/cloud-storage/operations/stat-file/index.d.ts +16 -16
  387. package/node/cloud-storage/operations/stat-file/index.js +4 -4
  388. package/node/cloud-storage/operations/upload-file/index.d.ts +23 -23
  389. package/node/cloud-storage/operations/upload-file/index.js +5 -5
  390. package/node/encryption/@aes-256-gcm/buffer/index.d.ts +6 -6
  391. package/node/encryption/@aes-256-gcm/buffer/index.js +6 -6
  392. package/node/encryption/@aes-256-gcm/uint8-array/index.d.ts +8 -8
  393. package/node/encryption/@aes-256-gcm/uint8-array/index.js +8 -8
  394. package/node/encryption/key/index.d.ts +6 -6
  395. package/node/encryption/key/index.js +6 -6
  396. package/node/files/read-write/index.d.ts +16 -16
  397. package/node/files/subpaths/index.d.ts +8 -8
  398. package/node/files/subpaths/index.js +11 -13
  399. package/node/ftps/directory/copy-dir/index.d.ts +6 -6
  400. package/node/ftps/directory/copy-dir/index.js +6 -6
  401. package/node/ftps/directory/list/index.d.ts +4 -4
  402. package/node/ftps/directory/list/index.js +3 -3
  403. package/node/ftps/directory/move-dir/index.d.ts +6 -6
  404. package/node/ftps/directory/move-dir/index.js +5 -5
  405. package/node/ftps/directory/remove-dir/index.d.ts +6 -6
  406. package/node/ftps/directory/remove-dir/index.js +8 -7
  407. package/node/ftps/file/copy/index.d.ts +6 -6
  408. package/node/ftps/file/copy/index.js +5 -5
  409. package/node/ftps/file/download/index.d.ts +6 -6
  410. package/node/ftps/file/download/index.js +5 -5
  411. package/node/ftps/file/exists/index.d.ts +3 -3
  412. package/node/ftps/file/exists/index.js +3 -3
  413. package/node/ftps/file/move/index.d.ts +8 -8
  414. package/node/ftps/file/move/index.js +11 -9
  415. package/node/ftps/file/remove/index.d.ts +5 -5
  416. package/node/ftps/file/remove/index.js +4 -4
  417. package/node/ftps/file/stat/index.d.ts +4 -4
  418. package/node/ftps/file/stat/index.js +4 -4
  419. package/node/ftps/file/upload/index.d.ts +7 -7
  420. package/node/ftps/file/upload/index.js +5 -5
  421. package/node/images/create/index.d.ts +2 -2
  422. package/node/images/create/index.js +1 -1
  423. package/node/images/format/index.d.ts +8 -8
  424. package/node/images/metadata/index.d.ts +2 -2
  425. package/node/images/transform/index.d.ts +2 -2
  426. package/node/images/transform/index.js +12 -2
  427. package/node/images/transform/operations/blur/index.d.ts +2 -2
  428. package/node/images/transform/operations/blur/index.js +1 -0
  429. package/node/images/transform/operations/brighten/index.d.ts +2 -2
  430. package/node/images/transform/operations/brighten/index.js +1 -0
  431. package/node/images/transform/operations/extend/index.d.ts +2 -2
  432. package/node/images/transform/operations/extend/index.js +1 -0
  433. package/node/images/transform/operations/extract/index.d.ts +2 -2
  434. package/node/images/transform/operations/extract/index.js +1 -0
  435. package/node/images/transform/operations/flatten/index.d.ts +2 -2
  436. package/node/images/transform/operations/flatten/index.js +1 -0
  437. package/node/images/transform/operations/flip/index.d.ts +2 -2
  438. package/node/images/transform/operations/flip/index.js +1 -0
  439. package/node/images/transform/operations/flop/index.d.ts +2 -2
  440. package/node/images/transform/operations/flop/index.js +1 -0
  441. package/node/images/transform/operations/hue/index.d.ts +2 -2
  442. package/node/images/transform/operations/hue/index.js +1 -0
  443. package/node/images/transform/operations/index.d.ts +2 -2
  444. package/node/images/transform/operations/index.js +2 -2
  445. package/node/images/transform/operations/level/index.d.ts +2 -2
  446. package/node/images/transform/operations/level/index.js +1 -0
  447. package/node/images/transform/operations/lighten/index.d.ts +2 -2
  448. package/node/images/transform/operations/lighten/index.js +1 -0
  449. package/node/images/transform/operations/normalize/index.d.ts +2 -2
  450. package/node/images/transform/operations/normalize/index.js +1 -0
  451. package/node/images/transform/operations/overlay/index.d.ts +2 -2
  452. package/node/images/transform/operations/resize/index.d.ts +2 -2
  453. package/node/images/transform/operations/resize/index.js +1 -0
  454. package/node/images/transform/operations/rotate/index.d.ts +2 -2
  455. package/node/images/transform/operations/rotate/index.js +1 -0
  456. package/node/images/transform/operations/saturate/index.d.ts +2 -2
  457. package/node/images/transform/operations/saturate/index.js +1 -0
  458. package/node/images/types.d.ts +41 -2
  459. package/node/images/utils/index.d.ts +10 -5
  460. package/node/process/index.d.ts +1 -1
  461. package/node/process/index.js +1 -1
  462. package/node/process/on-exit/index.js +2 -4
  463. package/node/process/prompt-continue/index.d.ts +3 -3
  464. package/node/process/prompt-continue/index.js +4 -3
  465. package/node/process/spawner/index.js +7 -6
  466. package/node/sftp/directory/copy-dir/index.d.ts +6 -6
  467. package/node/sftp/directory/copy-dir/index.js +6 -6
  468. package/node/sftp/directory/list/index.d.ts +3 -3
  469. package/node/sftp/directory/list/index.js +4 -4
  470. package/node/sftp/directory/move-dir/index.d.ts +7 -7
  471. package/node/sftp/directory/move-dir/index.js +7 -7
  472. package/node/sftp/directory/remove-dir/index.d.ts +5 -5
  473. package/node/sftp/directory/remove-dir/index.js +8 -7
  474. package/node/sftp/file/copy/index.d.ts +6 -6
  475. package/node/sftp/file/copy/index.js +5 -5
  476. package/node/sftp/file/download/index.d.ts +7 -7
  477. package/node/sftp/file/download/index.js +5 -5
  478. package/node/sftp/file/exists/index.d.ts +3 -3
  479. package/node/sftp/file/exists/index.js +3 -3
  480. package/node/sftp/file/index.d.ts +1 -1
  481. package/node/sftp/file/index.js +1 -1
  482. package/node/sftp/file/move/index.d.ts +7 -7
  483. package/node/sftp/file/move/index.js +7 -7
  484. package/node/sftp/file/remove/index.d.ts +4 -4
  485. package/node/sftp/file/remove/index.js +4 -4
  486. package/node/sftp/file/stat/index.d.ts +3 -3
  487. package/node/sftp/file/stat/index.js +6 -5
  488. package/node/sftp/file/upload/index.d.ts +6 -6
  489. package/node/sftp/file/upload/index.js +5 -5
  490. package/package.json +40 -39
@@ -6,8 +6,8 @@ import { isFalsy } from '../../booleans/is-falsy/index.js';
6
6
  * - Strings equal to `"true"` (case-insensitive, trimmed) are `true`, others `false`.
7
7
  * - Other values are coerced using `!isFalsy`.
8
8
  *
9
- * @param {unknown} value - The value to convert.
10
- * @returns {boolean} The boolean representation of the input.
9
+ * @param value - The value to convert.
10
+ * @returns The boolean representation of the input.
11
11
  */
12
12
  export function toBoolean(value) {
13
13
  if (typeof value === 'boolean')
@@ -26,8 +26,8 @@ export function toBoolean(value) {
26
26
  * - Strings are parsed as floats.
27
27
  * - Other values return 0.
28
28
  *
29
- * @param {unknown} value - The value to convert.
30
- * @returns {number} The numeric representation of the input.
29
+ * @param value - The value to convert.
30
+ * @returns The numeric representation of the input.
31
31
  */
32
32
  export function toNumber(value) {
33
33
  if (typeof value === 'number')
@@ -42,8 +42,8 @@ export function toNumber(value) {
42
42
  * - Strings are returned as-is.
43
43
  * - Other values are converted using `String()`.
44
44
  *
45
- * @param {unknown} value - The value to convert.
46
- * @returns {string} The string representation of the input.
45
+ * @param value - The value to convert.
46
+ * @returns The string representation of the input.
47
47
  */
48
48
  export function toString(value) {
49
49
  if (typeof value === 'string')
@@ -53,8 +53,8 @@ export function toString(value) {
53
53
  /**
54
54
  * Converts any value to `null`.
55
55
  *
56
- * @param {unknown} _value - The input value (ignored).
57
- * @returns {null} Always returns `null`.
56
+ * @param _value - The input value (ignored).
57
+ * @returns Always returns `null`.
58
58
  */
59
59
  export function toNull(_value) {
60
60
  return null;
@@ -66,8 +66,8 @@ export function toNull(_value) {
66
66
  * - Objects are converted to an array of `[key, value]` pairs.
67
67
  * - Other values are wrapped in a single-element array.
68
68
  *
69
- * @param {unknown} value - The value to convert.
70
- * @returns {Array<unknown>} The array representation of the input.
69
+ * @param value - The value to convert.
70
+ * @returns The array representation of the input.
71
71
  */
72
72
  export function toArray(value) {
73
73
  if (Array.isArray(value))
@@ -83,8 +83,8 @@ export function toArray(value) {
83
83
  * - Uses `toArray` to ensure an array.
84
84
  * - Each element is converted to a number using `toNumber`.
85
85
  *
86
- * @param {unknown} value - The value to convert.
87
- * @returns {number[]} Array of numeric values.
86
+ * @param value - The value to convert.
87
+ * @returns Array of numeric values.
88
88
  */
89
89
  export function toNumberArr(value) {
90
90
  const arrValue = toArray(value);
@@ -96,16 +96,16 @@ export function toNumberArr(value) {
96
96
  * - Keys and values of objects are copied.
97
97
  * - Non-object values return an empty object.
98
98
  *
99
- * @param {unknown} value - The value to convert.
100
- * @returns {Record<string, unknown>} The object representation of the input.
99
+ * @param value - The value to convert.
100
+ * @returns The object representation of the input.
101
101
  */
102
102
  export function toRecord(value) {
103
103
  const record = {};
104
104
  try {
105
105
  Object
106
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
106
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- no runtime guard here; safety comes from the surrounding try/catch below
107
107
  .keys(value)
108
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
108
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- no runtime guard here; safety comes from the surrounding try/catch below
109
109
  .forEach(key => { record[key] = value[key]; });
110
110
  }
111
111
  catch (err) {
@@ -120,8 +120,8 @@ export function toRecord(value) {
120
120
  * - Strings are used as the error message.
121
121
  * - Other values are converted to string and used as the error message.
122
122
  *
123
- * @param {unknown} value - The value to convert.
124
- * @returns {Error} An `Error` instance representing the input.
123
+ * @param value - The value to convert.
124
+ * @returns An `Error` instance representing the input.
125
125
  */
126
126
  export function toError(value) {
127
127
  if (value instanceof Error)
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Represents a minimal network connection object.
3
3
  *
4
- * @property {number} downlink - Estimated downlink speed in Mbps.
5
- * @property {'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown'} type - Connection type.
6
- * @property {'slow-2g' | '2g' | '3g' | '4g'} effectiveType - Effective connection type.
4
+ * @property downlink - Estimated downlink speed in Mbps.
5
+ * @property type - Connection type.
6
+ * @property effectiveType - Effective connection type.
7
7
  */
8
8
  export type MinimalConnection = {
9
9
  downlink: number;
@@ -15,12 +15,12 @@ export type MinimalConnection = {
15
15
  *
16
16
  * Uses the `navigator.connection` API or vendor-prefixed alternatives.
17
17
  *
18
- * @returns {MinimalConnection | undefined} A minimal connection object if available, otherwise `undefined`.
18
+ * @returns A minimal connection object if available, otherwise `undefined`.
19
19
  */
20
20
  export declare function getConnection(): MinimalConnection | undefined;
21
21
  /**
22
22
  * Retrieves the estimated downlink speed of the current network connection.
23
23
  *
24
- * @returns {number | undefined} Downlink speed in Mbps, or `undefined` if not available.
24
+ * @returns Downlink speed in Mbps, or `undefined` if not available.
25
25
  */
26
26
  export declare function getCurrentDownlink(): number | undefined;
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */
1
2
  import * as Window from '../crossenv/window/index.js';
2
3
  function isType(unk) {
3
4
  return unk === 'bluetooth'
@@ -39,10 +40,11 @@ function isConnection(unk) {
39
40
  *
40
41
  * Uses the `navigator.connection` API or vendor-prefixed alternatives.
41
42
  *
42
- * @returns {MinimalConnection | undefined} A minimal connection object if available, otherwise `undefined`.
43
+ * @returns A minimal connection object if available, otherwise `undefined`.
43
44
  */
44
45
  export function getConnection() {
45
46
  const window = Window.get();
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-type-assertion -- MinimalWindow deliberately doesn't declare `navigator`; this is browser-only feature detection, guarded by the typeof/null check below
46
48
  const navigator = window.navigator;
47
49
  if (typeof navigator !== 'object' || navigator === null)
48
50
  return undefined;
@@ -56,7 +58,7 @@ export function getConnection() {
56
58
  /**
57
59
  * Retrieves the estimated downlink speed of the current network connection.
58
60
  *
59
- * @returns {number | undefined} Downlink speed in Mbps, or `undefined` if not available.
61
+ * @returns Downlink speed in Mbps, or `undefined` if not available.
60
62
  */
61
63
  export function getCurrentDownlink() {
62
64
  return getConnection()?.downlink;
@@ -2,29 +2,29 @@
2
2
  * Function that fetches content from a URL asynchronously.
3
3
  *
4
4
  * @template T - The type of content returned by the fetcher.
5
- * @param {string} url - The URL to fetch.
6
- * @returns {Promise<T>} A promise resolving to the fetched content.
5
+ * @param url - The URL to fetch.
6
+ * @returns A promise resolving to the fetched content.
7
7
  */
8
8
  export type Fetcher<T> = (url: string) => Promise<T>;
9
9
  /**
10
10
  * Function that processes fetched content for a given URL.
11
11
  *
12
12
  * @template T - The type of content provided by the fetcher.
13
- * @param {string} url - The URL of the content being processed.
14
- * @param {T} content - The content fetched from the URL.
15
- * @param {object} hooks - Hooks for accessing crawler state and controlling the crawl.
16
- * @param {(...urls: string[]) => void} hooks.push - Enqueue one or more URLs to be crawled.
17
- * @param {() => void} hooks.flush - Clear the waitlist of pending URLs.
18
- * @param {Set<string>} hooks.processed - Read-only snapshot of URLs already processed.
19
- * @param {string[]} hooks.waitlist - Read-only snapshot of the current waitlist of URLs.
20
- * @returns {any} The result of processing (ignored by the crawler).
13
+ * @param url - The URL of the content being processed.
14
+ * @param content - The content fetched from the URL.
15
+ * @param hooks - Hooks for accessing crawler state and controlling the crawl.
16
+ * @param hooks.push - Enqueue one or more URLs to be crawled.
17
+ * @param hooks.flush - Clear the waitlist of pending URLs.
18
+ * @param hooks.processed - Read-only snapshot of URLs already processed.
19
+ * @param hooks.waitlist - Read-only snapshot of the current waitlist of URLs.
20
+ * @returns The result of processing (ignored by the crawler).
21
21
  */
22
22
  export type Processor<T> = (url: string, content: T, hooks: {
23
23
  push: (...urls: string[]) => void;
24
24
  flush: () => void;
25
25
  processed: Set<string>;
26
26
  waitlist: string[];
27
- }) => any;
27
+ }) => unknown;
28
28
  /**
29
29
  * Configuration options for the crawler.
30
30
  *
@@ -61,13 +61,13 @@ export type Crawler = {
61
61
  * Creates a sequential crawler with optional delay.
62
62
  *
63
63
  * @template T - The type of content returned by the fetcher.
64
- * @param {Options<T>} options - Crawler configuration options.
65
- * @param {number} options.limit - Maximum number of URLs to process.
66
- * @param {number | (() => number)} [options.delayMs] - Optional delay between processing URLs, in milliseconds, or a function returning the delay.
67
- * @param {boolean} [options.allowDuplicates] - Optional, allows fetching and processing a URL that has already been seen.
68
- * @param {Fetcher<T>} options.fetcher - Function that fetches content for each URL.
69
- * @param {Processor<T>} options.processor - Function that processes fetched content.
70
- * @returns {Crawler} An object with methods to start crawling, enqueue URLs, flush the waitlist, and access crawler state.
64
+ * @param options - Crawler configuration options.
65
+ * @param options.limit - Maximum number of URLs to process.
66
+ * @param [options.delayMs] - Optional delay between processing URLs, in milliseconds, or a function returning the delay.
67
+ * @param [options.allowDuplicates] - Optional, allows fetching and processing a URL that has already been seen.
68
+ * @param options.fetcher - Function that fetches content for each URL.
69
+ * @param options.processor - Function that processes fetched content.
70
+ * @returns An object with methods to start crawling, enqueue URLs, flush the waitlist, and access crawler state.
71
71
  *
72
72
  * @example
73
73
  * ```typescript
@@ -3,13 +3,13 @@ import { wait } from '../../time/wait/index.js';
3
3
  * Creates a sequential crawler with optional delay.
4
4
  *
5
5
  * @template T - The type of content returned by the fetcher.
6
- * @param {Options<T>} options - Crawler configuration options.
7
- * @param {number} options.limit - Maximum number of URLs to process.
8
- * @param {number | (() => number)} [options.delayMs] - Optional delay between processing URLs, in milliseconds, or a function returning the delay.
9
- * @param {boolean} [options.allowDuplicates] - Optional, allows fetching and processing a URL that has already been seen.
10
- * @param {Fetcher<T>} options.fetcher - Function that fetches content for each URL.
11
- * @param {Processor<T>} options.processor - Function that processes fetched content.
12
- * @returns {Crawler} An object with methods to start crawling, enqueue URLs, flush the waitlist, and access crawler state.
6
+ * @param options - Crawler configuration options.
7
+ * @param options.limit - Maximum number of URLs to process.
8
+ * @param [options.delayMs] - Optional delay between processing URLs, in milliseconds, or a function returning the delay.
9
+ * @param [options.allowDuplicates] - Optional, allows fetching and processing a URL that has already been seen.
10
+ * @param options.fetcher - Function that fetches content for each URL.
11
+ * @param options.processor - Function that processes fetched content.
12
+ * @returns An object with methods to start crawling, enqueue URLs, flush the waitlist, and access crawler state.
13
13
  *
14
14
  * @example
15
15
  * ```typescript
@@ -31,13 +31,14 @@ import { wait } from '../../time/wait/index.js';
31
31
  export function create(options) {
32
32
  let ops = 0;
33
33
  const waitlist = [];
34
- const push = (...urls) => waitlist.push(...urls);
34
+ const push = (...urls) => { waitlist.push(...urls); };
35
35
  const flush = () => { waitlist.length = 0; };
36
36
  const processed = new Set();
37
37
  const crawl = async (startUrl) => {
38
38
  push(startUrl);
39
39
  while (waitlist.length > 0 && ops < options.limit) {
40
- ops++;
40
+ ops = ops + 1;
41
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- waitlist.length > 0 is guaranteed by the while condition above
41
42
  const currentUrl = waitlist[0];
42
43
  if (!processed.has(currentUrl) || options.allowDuplicates === true) {
43
44
  const content = await options.fetcher(currentUrl);
@@ -5,7 +5,7 @@ describe('create', () => {
5
5
  const crawler = create({
6
6
  limit: 10,
7
7
  fetcher: async () => 'content',
8
- processor: async () => { }
8
+ processor: async () => undefined
9
9
  });
10
10
  expect(crawler).toHaveProperty('crawl');
11
11
  expect(crawler).toHaveProperty('push');
@@ -36,7 +36,7 @@ describe('create', () => {
36
36
  });
37
37
  it('respects delay when provided', async () => {
38
38
  const fetcher = vi.fn(async (url) => `content-${url}`);
39
- const processor = vi.fn(async () => { });
39
+ const processor = vi.fn(async () => undefined);
40
40
  const startTime = Date.now();
41
41
  const crawler = create({ limit: 2, delayMs: 20, fetcher, processor });
42
42
  await crawler.crawl('url1');
@@ -5,7 +5,7 @@ import { RuntimeName } from '../types.js';
5
5
  * Checks for Node.js, Browser, Deno, React Native, Electron,
6
6
  * Cloudflare Workers, and AWS Lambda.
7
7
  *
8
- * @returns {RuntimeName | null}
8
+ * @returns
9
9
  * - The detected runtime as a `RuntimeName` enum value.
10
10
  * - `null` if the runtime cannot be determined.
11
11
  */
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition */
1
2
  import { RuntimeName } from '../types.js';
2
3
  /**
3
4
  * Detects the current JavaScript runtime environment.
@@ -5,37 +6,35 @@ import { RuntimeName } from '../types.js';
5
6
  * Checks for Node.js, Browser, Deno, React Native, Electron,
6
7
  * Cloudflare Workers, and AWS Lambda.
7
8
  *
8
- * @returns {RuntimeName | null}
9
+ * @returns
9
10
  * - The detected runtime as a `RuntimeName` enum value.
10
11
  * - `null` if the runtime cannot be determined.
11
12
  */
12
13
  export function detectRuntime() {
13
14
  /* Node.js */
14
- if (typeof process?.versions?.node !== 'undefined')
15
+ if (process?.versions?.node !== undefined)
15
16
  return RuntimeName.NODE;
16
17
  /* Browser */
17
- if (typeof window?.document !== 'undefined')
18
+ if (window?.document !== undefined)
18
19
  return RuntimeName.BROWSER;
19
20
  /* Deno */
20
- if (typeof Deno !== 'undefined')
21
+ if (Deno !== undefined)
21
22
  return RuntimeName.DENO;
22
23
  /* React Native */
23
- if (typeof process !== 'undefined'
24
+ if (process !== undefined
24
25
  && typeof navigator.userAgent === 'string'
25
26
  && navigator.userAgent.includes('ReactNative'))
26
27
  return RuntimeName.REACT_NATIVE;
27
28
  /* Electron */
28
- if (typeof process?.versions !== 'undefined'
29
- && typeof process.version.electron !== 'undefined')
29
+ if (process?.versions?.electron !== undefined)
30
30
  return RuntimeName.ELECTRON;
31
31
  /* Cloudflare Workers */
32
- if (typeof self !== 'undefined'
32
+ if (self !== undefined
33
33
  && typeof self.addEventListener === 'function'
34
- && typeof Headers !== 'undefined')
34
+ && Headers !== undefined)
35
35
  return RuntimeName.CLOUDFLARE;
36
36
  /* AWS Lambda */
37
- if (typeof AWS !== 'undefined'
38
- && typeof AWS.Lambda !== 'undefined')
37
+ if (AWS !== undefined)
39
38
  return RuntimeName.AWS_LAMBDA;
40
39
  /* Other */
41
40
  return null;
@@ -1,28 +1,28 @@
1
- import { type MinimalWindow } from '../types.js';
1
+ import type { MinimalWindow } from '../types.js';
2
2
  /**
3
3
  * Checks whether a `window` object exists in the current environment.
4
4
  *
5
- * @returns {boolean} `true` if `window` is present, `false` otherwise.
5
+ * @returns `true` if `window` is present, `false` otherwise.
6
6
  */
7
7
  export declare function exists(): boolean;
8
8
  /**
9
9
  * Sets a custom `window` object to be used internally.
10
10
  *
11
- * @param {MinimalWindow | null} customWindow - The window object to set, or `null` to unset.
12
- * @returns {MinimalWindow | null} The window object that was set.
11
+ * @param customWindow - The window object to set, or `null` to unset.
12
+ * @returns The window object that was set.
13
13
  */
14
14
  export declare function set(customWindow: MinimalWindow | null): MinimalWindow | null;
15
15
  /**
16
16
  * Resets the internal window reference to the global `window` if it exists,
17
17
  * or `null` if no global `window` is available.
18
18
  *
19
- * @returns {MinimalWindow | null} The current internal window object after reset.
19
+ * @returns The current internal window object after reset.
20
20
  */
21
21
  export declare function unset(): MinimalWindow | null;
22
22
  /**
23
23
  * Retrieves the currently set `window` object.
24
24
  *
25
- * @returns {MinimalWindow} The internal window object.
25
+ * @returns The internal window object.
26
26
  * @throws Will throw an error if no window has been set and none exists globally.
27
27
  */
28
28
  export declare function get(): MinimalWindow;
@@ -1,20 +1,21 @@
1
1
  /**
2
2
  * Checks whether a `window` object exists in the current environment.
3
3
  *
4
- * @returns {boolean} `true` if `window` is present, `false` otherwise.
4
+ * @returns `true` if `window` is present, `false` otherwise.
5
5
  */
6
6
  export function exists() {
7
7
  return typeof globalThis !== 'undefined'
8
8
  && 'window' in globalThis;
9
9
  }
10
10
  let _window = exists()
11
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
11
12
  ? (globalThis.window ?? null)
12
13
  : null;
13
14
  /**
14
15
  * Sets a custom `window` object to be used internally.
15
16
  *
16
- * @param {MinimalWindow | null} customWindow - The window object to set, or `null` to unset.
17
- * @returns {MinimalWindow | null} The window object that was set.
17
+ * @param customWindow - The window object to set, or `null` to unset.
18
+ * @returns The window object that was set.
18
19
  */
19
20
  export function set(customWindow) {
20
21
  _window = customWindow;
@@ -24,7 +25,7 @@ export function set(customWindow) {
24
25
  * Resets the internal window reference to the global `window` if it exists,
25
26
  * or `null` if no global `window` is available.
26
27
  *
27
- * @returns {MinimalWindow | null} The current internal window object after reset.
28
+ * @returns The current internal window object after reset.
28
29
  */
29
30
  export function unset() {
30
31
  if (exists()) {
@@ -38,7 +39,7 @@ export function unset() {
38
39
  /**
39
40
  * Retrieves the currently set `window` object.
40
41
  *
41
- * @returns {MinimalWindow} The internal window object.
42
+ * @returns The internal window object.
42
43
  * @throws Will throw an error if no window has been set and none exists globally.
43
44
  */
44
45
  export function get() {
@@ -42,6 +42,7 @@ export class DataSize {
42
42
  else if (unit === 'PiB' || unit === 'pebibyte') {
43
43
  this.unit = 'pebibyte';
44
44
  }
45
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
45
46
  else if (unit === 'EiB' || unit === 'exbibyte') {
46
47
  this.unit = 'exbibyte';
47
48
  }
@@ -90,6 +91,7 @@ export class DataSize {
90
91
  return this.value * 8 * Math.pow(1024, 4);
91
92
  if (this.unit === 'pebibyte')
92
93
  return this.value * 8 * Math.pow(1024, 5);
94
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
93
95
  if (this.unit === 'exbibyte')
94
96
  return this.value * 8 * Math.pow(1024, 6);
95
97
  return this.value; // defaults to bits
@@ -4,9 +4,9 @@ export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
5
  export * as crossenv from './crossenv/index.js'
6
6
  export * as dataSize from './data-size/index.js'
7
- export * as isNullish from './is-nullish/index.js'
8
7
  export * as isConstructorFunction from './is-constructor-function/index.js'
8
+ export * as isNullish from './is-nullish/index.js'
9
+ export * as logs from './logs/index.js'
9
10
  export * as loremIpsum from './lorem-ipsum/index.js'
10
11
  export * as normalizeExtension from './normalize-extension/index.js'
11
12
  export * as outcome from './outcome/index.js'
12
- export * as logs from './logs/index.js'
@@ -4,9 +4,9 @@ export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
5
  export * as crossenv from './crossenv/index.js'
6
6
  export * as dataSize from './data-size/index.js'
7
- export * as isNullish from './is-nullish/index.js'
8
7
  export * as isConstructorFunction from './is-constructor-function/index.js'
8
+ export * as isNullish from './is-nullish/index.js'
9
+ export * as logs from './logs/index.js'
9
10
  export * as loremIpsum from './lorem-ipsum/index.js'
10
11
  export * as normalizeExtension from './normalize-extension/index.js'
11
12
  export * as outcome from './outcome/index.js'
12
- export * as logs from './logs/index.js'
@@ -7,7 +7,7 @@ export type ConstructorFunction<T = any> = new (...args: any[]) => T;
7
7
  /**
8
8
  * Checks whether a given value is a constructor function (i.e., a class or function with a prototype).
9
9
  *
10
- * @param {unknown} input - The value to check.
11
- * @returns {input is ConstructorFunction} `true` if the input is a constructor function, otherwise `false`.
10
+ * @param input - The value to check.
11
+ * @returns `true` if the input is a constructor function, otherwise `false`.
12
12
  */
13
13
  export declare function isConstructorFunction(input: unknown): input is ConstructorFunction;
@@ -1,8 +1,9 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
1
2
  /**
2
3
  * Checks whether a given value is a constructor function (i.e., a class or function with a prototype).
3
4
  *
4
- * @param {unknown} input - The value to check.
5
- * @returns {input is ConstructorFunction} `true` if the input is a constructor function, otherwise `false`.
5
+ * @param input - The value to check.
6
+ * @returns `true` if the input is a constructor function, otherwise `false`.
6
7
  */
7
8
  export function isConstructorFunction(input) {
8
9
  return typeof input === 'function'
@@ -14,11 +14,11 @@ describe('isConstructorFunction', () => {
14
14
  expect(isConstructorFunction(MyClass)).toBe(true);
15
15
  });
16
16
  it('returns true for regular functions', () => {
17
- function regularFunction() { }
17
+ const regularFunction = function () { return undefined; };
18
18
  expect(isConstructorFunction(regularFunction)).toBe(true);
19
19
  });
20
20
  it('returns false for arrow functions', () => {
21
- const arrowFunction = () => { };
21
+ const arrowFunction = () => undefined;
22
22
  expect(isConstructorFunction(arrowFunction)).toBe(false);
23
23
  });
24
24
  it('returns false for non-functions', () => {
@@ -12,15 +12,15 @@ export type Nullish = null | undefined;
12
12
  * Checks whether a value is nullish (`null` or `undefined`).
13
13
  *
14
14
  * @template T
15
- * @param {T | Nullish} val - The value to check.
16
- * @returns {val is Nullish} `true` if the value is nullish, otherwise `false`.
15
+ * @param val - The value to check.
16
+ * @returns `true` if the value is nullish, otherwise `false`.
17
17
  */
18
- export declare function isNullish<T>(val: T | Nullish): val is Nullish;
18
+ export declare function isNullish(val: unknown): val is Nullish;
19
19
  /**
20
20
  * Checks whether a value is not nullish (`null` or `undefined`).
21
21
  *
22
22
  * @template T
23
- * @param {T} val - The value to check.
24
- * @returns {val is Exclude<T, Nullish>} `true` if the value is not nullish, otherwise `false`.
23
+ * @param val - The value to check.
24
+ * @returns `true` if the value is not nullish, otherwise `false`.
25
25
  */
26
26
  export declare function isNotNullish<T>(val: T): val is Exclude<T, Nullish>;
@@ -8,18 +8,19 @@ export const nullishValues = [null, undefined];
8
8
  * Checks whether a value is nullish (`null` or `undefined`).
9
9
  *
10
10
  * @template T
11
- * @param {T | Nullish} val - The value to check.
12
- * @returns {val is Nullish} `true` if the value is nullish, otherwise `false`.
11
+ * @param val - The value to check.
12
+ * @returns `true` if the value is nullish, otherwise `false`.
13
13
  */
14
14
  export function isNullish(val) {
15
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Array.includes() does a strict equality check regardless of this cast; safe for any T
15
16
  return nullishValues.includes(val);
16
17
  }
17
18
  /**
18
19
  * Checks whether a value is not nullish (`null` or `undefined`).
19
20
  *
20
21
  * @template T
21
- * @param {T} val - The value to check.
22
- * @returns {val is Exclude<T, Nullish>} `true` if the value is not nullish, otherwise `false`.
22
+ * @param val - The value to check.
23
+ * @returns `true` if the value is not nullish, otherwise `false`.
23
24
  */
24
25
  export function isNotNullish(val) {
25
26
  return !isNullish(val);
@@ -1,3 +1,3 @@
1
1
  export * as logger from './logger/index.js'
2
- export * as makeTextBlock from './make-text-block/index.js'
3
2
  export * as styles from './styles/index.js'
3
+ export * as makeTextBlock from './make-text-block/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as logger from './logger/index.js'
2
- export * as makeTextBlock from './make-text-block/index.js'
3
2
  export * as styles from './styles/index.js'
3
+ export * as makeTextBlock from './make-text-block/index.js'
@@ -12,7 +12,7 @@ class Log {
12
12
  this.stack = (new Error().stack ?? '');
13
13
  }
14
14
  get displayTime() {
15
- return this.time.toLocaleDateString('en-US', {
15
+ return `${this.time.toLocaleDateString('en-US', {
16
16
  year: 'numeric',
17
17
  month: 'short',
18
18
  day: 'numeric',
@@ -20,7 +20,7 @@ class Log {
20
20
  hour: 'numeric',
21
21
  minute: 'numeric',
22
22
  second: 'numeric'
23
- }) + `:${this.time.getMilliseconds()}`;
23
+ })}:${this.time.getMilliseconds()}`;
24
24
  }
25
25
  get elapsedTimeMs() {
26
26
  return (this.time.getTime() - logsTimeOrigin.getTime()) / 1000;
@@ -26,7 +26,7 @@ export const words = [
26
26
  export const generateSentence = (wordCount) => {
27
27
  const resultArr = [];
28
28
  let currentWordCound = wordCount;
29
- for (let i = 0; i < currentWordCound; i++) {
29
+ for (let i = 0; i < currentWordCound; i = i + 1) {
30
30
  const picked = randomPick(words);
31
31
  if (typeof picked === 'string')
32
32
  resultArr.push(picked);
@@ -37,8 +37,8 @@ export const generateSentence = (wordCount) => {
37
37
  const [firstWord, ...otherWords] = resultArr;
38
38
  if (firstWord === undefined)
39
39
  return '';
40
- const capFirstLetter = firstWord?.charAt(0).toUpperCase();
41
- const restOfFirstWord = firstWord?.slice(1);
40
+ const capFirstLetter = firstWord.charAt(0).toUpperCase();
41
+ const restOfFirstWord = firstWord.slice(1);
42
42
  const sentence = [
43
43
  `${capFirstLetter}${restOfFirstWord}`,
44
44
  ...otherWords
@@ -47,7 +47,7 @@ export const generateSentence = (wordCount) => {
47
47
  };
48
48
  export const generateSentences = (sentencesCount, maxSentenceLength = 12, minSentenceLength = 4) => {
49
49
  const sentences = [];
50
- for (let i = 0; i < sentencesCount; i++) {
50
+ for (let i = 0; i < sentencesCount; i = i + 1) {
51
51
  const length = randomInt(maxSentenceLength, minSentenceLength) ?? 8;
52
52
  sentences.push(generateSentence(length));
53
53
  }
@@ -4,8 +4,8 @@
4
4
  * Converts the extension to lowercase, removes a leading dot if present,
5
5
  * and applies alias mapping if defined.
6
6
  *
7
- * @param {string} extWithoutDot - File extension to normalize (may include or omit leading dot).
8
- * @param {Record<string, string>} [aliasesWithoutDot=defaultAliases] - Optional mapping of aliases to canonical extensions.
9
- * @returns {string} The normalized file extension, without leading dot.
7
+ * @param extWithoutDot - File extension to normalize (may include or omit leading dot).
8
+ * @param [aliasesWithoutDot=defaultAliases] - Optional mapping of aliases to canonical extensions.
9
+ * @returns The normalized file extension, without leading dot.
10
10
  */
11
11
  export declare function normalizeExtension(extWithoutDot: string, aliasesWithoutDot?: Record<string, string>): string;
@@ -91,11 +91,11 @@ const defaultAliases = {
91
91
  * Converts the extension to lowercase, removes a leading dot if present,
92
92
  * and applies alias mapping if defined.
93
93
  *
94
- * @param {string} extWithoutDot - File extension to normalize (may include or omit leading dot).
95
- * @param {Record<string, string>} [aliasesWithoutDot=defaultAliases] - Optional mapping of aliases to canonical extensions.
96
- * @returns {string} The normalized file extension, without leading dot.
94
+ * @param extWithoutDot - File extension to normalize (may include or omit leading dot).
95
+ * @param [aliasesWithoutDot=defaultAliases] - Optional mapping of aliases to canonical extensions.
96
+ * @returns The normalized file extension, without leading dot.
97
97
  */
98
98
  export function normalizeExtension(extWithoutDot, aliasesWithoutDot = defaultAliases) {
99
- const cleaned = extWithoutDot.toLowerCase().replace(/^\./, '');
99
+ const cleaned = extWithoutDot.toLowerCase().replace(/^\./v, '');
100
100
  return aliasesWithoutDot[cleaned] ?? cleaned;
101
101
  }