@vielzeug/arsenal 3.0.0 → 26.10.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 (491) hide show
  1. package/dist/_common/_lruMap.cjs +1 -1
  2. package/dist/_common/_lruMap.cjs.map +1 -1
  3. package/dist/_common/_lruMap.js +1 -17
  4. package/dist/_common/_lruMap.js.map +1 -1
  5. package/dist/_common/_selectorSet.cjs +1 -1
  6. package/dist/_common/_selectorSet.cjs.map +1 -1
  7. package/dist/_common/_selectorSet.js +1 -15
  8. package/dist/_common/_selectorSet.js.map +1 -1
  9. package/dist/_common/unsafePaths.cjs +1 -1
  10. package/dist/_common/unsafePaths.cjs.map +1 -1
  11. package/dist/_common/unsafePaths.js +1 -12
  12. package/dist/_common/unsafePaths.js.map +1 -1
  13. package/dist/_dev.cjs +1 -1
  14. package/dist/_dev.cjs.map +1 -1
  15. package/dist/_dev.js +1 -5
  16. package/dist/_dev.js.map +1 -1
  17. package/dist/array/chunk.cjs +1 -1
  18. package/dist/array/chunk.cjs.map +1 -1
  19. package/dist/array/chunk.js +1 -9
  20. package/dist/array/chunk.js.map +1 -1
  21. package/dist/array/compact.cjs +1 -1
  22. package/dist/array/compact.cjs.map +1 -1
  23. package/dist/array/compact.js +1 -7
  24. package/dist/array/compact.js.map +1 -1
  25. package/dist/array/compare.cjs +1 -1
  26. package/dist/array/compare.cjs.map +1 -1
  27. package/dist/array/compare.js +1 -18
  28. package/dist/array/compare.js.map +1 -1
  29. package/dist/array/compareBy.cjs +1 -1
  30. package/dist/array/compareBy.cjs.map +1 -1
  31. package/dist/array/compareBy.js +1 -15
  32. package/dist/array/compareBy.js.map +1 -1
  33. package/dist/array/contains.cjs +1 -1
  34. package/dist/array/contains.cjs.map +1 -1
  35. package/dist/array/contains.js +1 -8
  36. package/dist/array/contains.js.map +1 -1
  37. package/dist/array/countBy.cjs +1 -1
  38. package/dist/array/countBy.cjs.map +1 -1
  39. package/dist/array/countBy.js +1 -13
  40. package/dist/array/countBy.js.map +1 -1
  41. package/dist/array/difference.cjs +1 -1
  42. package/dist/array/difference.cjs.map +1 -1
  43. package/dist/array/difference.js +1 -13
  44. package/dist/array/difference.js.map +1 -1
  45. package/dist/array/drop.cjs +1 -1
  46. package/dist/array/drop.cjs.map +1 -1
  47. package/dist/array/drop.js +1 -8
  48. package/dist/array/drop.js.map +1 -1
  49. package/dist/array/dropLast.cjs +1 -1
  50. package/dist/array/dropLast.cjs.map +1 -1
  51. package/dist/array/dropLast.js +1 -8
  52. package/dist/array/dropLast.js.map +1 -1
  53. package/dist/array/filterMap.cjs +1 -1
  54. package/dist/array/filterMap.cjs.map +1 -1
  55. package/dist/array/filterMap.js +1 -12
  56. package/dist/array/filterMap.js.map +1 -1
  57. package/dist/array/first.cjs +1 -1
  58. package/dist/array/first.cjs.map +1 -1
  59. package/dist/array/first.js +1 -7
  60. package/dist/array/first.js.map +1 -1
  61. package/dist/array/groupBy.cjs +1 -1
  62. package/dist/array/groupBy.cjs.map +1 -1
  63. package/dist/array/groupBy.js +1 -13
  64. package/dist/array/groupBy.js.map +1 -1
  65. package/dist/array/index.js +1 -28
  66. package/dist/array/indexBy.cjs +1 -1
  67. package/dist/array/indexBy.cjs.map +1 -1
  68. package/dist/array/indexBy.js +1 -13
  69. package/dist/array/indexBy.js.map +1 -1
  70. package/dist/array/intersection.cjs +1 -1
  71. package/dist/array/intersection.cjs.map +1 -1
  72. package/dist/array/intersection.js +1 -13
  73. package/dist/array/intersection.js.map +1 -1
  74. package/dist/array/last.cjs +1 -1
  75. package/dist/array/last.cjs.map +1 -1
  76. package/dist/array/last.js +1 -7
  77. package/dist/array/last.js.map +1 -1
  78. package/dist/array/partition.cjs +1 -1
  79. package/dist/array/partition.cjs.map +1 -1
  80. package/dist/array/partition.js +1 -9
  81. package/dist/array/partition.js.map +1 -1
  82. package/dist/array/replace.cjs +1 -1
  83. package/dist/array/replace.cjs.map +1 -1
  84. package/dist/array/replace.js +1 -12
  85. package/dist/array/replace.js.map +1 -1
  86. package/dist/array/rotate.cjs +1 -1
  87. package/dist/array/rotate.cjs.map +1 -1
  88. package/dist/array/rotate.js +1 -9
  89. package/dist/array/rotate.js.map +1 -1
  90. package/dist/array/search.cjs +1 -1
  91. package/dist/array/search.cjs.map +1 -1
  92. package/dist/array/search.js +1 -29
  93. package/dist/array/search.js.map +1 -1
  94. package/dist/array/sort.cjs +1 -1
  95. package/dist/array/sort.cjs.map +1 -1
  96. package/dist/array/sort.js +1 -14
  97. package/dist/array/sort.js.map +1 -1
  98. package/dist/array/take.cjs +1 -1
  99. package/dist/array/take.cjs.map +1 -1
  100. package/dist/array/take.js +1 -8
  101. package/dist/array/take.js.map +1 -1
  102. package/dist/array/takeLast.cjs +1 -1
  103. package/dist/array/takeLast.cjs.map +1 -1
  104. package/dist/array/takeLast.js +1 -8
  105. package/dist/array/takeLast.js.map +1 -1
  106. package/dist/array/toggle.cjs +1 -1
  107. package/dist/array/toggle.cjs.map +1 -1
  108. package/dist/array/toggle.js +1 -8
  109. package/dist/array/toggle.js.map +1 -1
  110. package/dist/array/union.cjs +1 -1
  111. package/dist/array/union.cjs.map +1 -1
  112. package/dist/array/union.js +1 -8
  113. package/dist/array/union.js.map +1 -1
  114. package/dist/array/uniq.cjs +1 -1
  115. package/dist/array/uniq.cjs.map +1 -1
  116. package/dist/array/uniq.js +1 -8
  117. package/dist/array/uniq.js.map +1 -1
  118. package/dist/array/unzip.cjs +1 -1
  119. package/dist/array/unzip.cjs.map +1 -1
  120. package/dist/array/unzip.js +1 -10
  121. package/dist/array/unzip.js.map +1 -1
  122. package/dist/array/zip.cjs +1 -1
  123. package/dist/array/zip.cjs.map +1 -1
  124. package/dist/array/zip.js +1 -10
  125. package/dist/array/zip.js.map +1 -1
  126. package/dist/arsenal.cjs +1 -1
  127. package/dist/arsenal.cjs.map +1 -1
  128. package/dist/arsenal.iife.js +1 -1
  129. package/dist/arsenal.iife.js.map +1 -1
  130. package/dist/arsenal.js +1 -1
  131. package/dist/arsenal.js.map +1 -1
  132. package/dist/async/abortError.cjs +1 -1
  133. package/dist/async/abortError.cjs.map +1 -1
  134. package/dist/async/abortError.js +1 -7
  135. package/dist/async/abortError.js.map +1 -1
  136. package/dist/async/abortable.cjs +1 -1
  137. package/dist/async/abortable.cjs.map +1 -1
  138. package/dist/async/abortable.js +1 -11
  139. package/dist/async/abortable.js.map +1 -1
  140. package/dist/async/attempt.cjs +1 -1
  141. package/dist/async/attempt.cjs.map +1 -1
  142. package/dist/async/attempt.js +1 -23
  143. package/dist/async/attempt.js.map +1 -1
  144. package/dist/async/backoff.cjs +1 -1
  145. package/dist/async/backoff.cjs.map +1 -1
  146. package/dist/async/backoff.js +1 -7
  147. package/dist/async/backoff.js.map +1 -1
  148. package/dist/async/index.js +1 -10
  149. package/dist/async/parallel.cjs +1 -1
  150. package/dist/async/parallel.cjs.map +1 -1
  151. package/dist/async/parallel.js +1 -24
  152. package/dist/async/parallel.js.map +1 -1
  153. package/dist/async/retry.cjs +1 -1
  154. package/dist/async/retry.cjs.map +1 -1
  155. package/dist/async/retry.d.ts +4 -6
  156. package/dist/async/retry.d.ts.map +1 -1
  157. package/dist/async/retry.js +1 -24
  158. package/dist/async/retry.js.map +1 -1
  159. package/dist/async/sleep.cjs +1 -1
  160. package/dist/async/sleep.cjs.map +1 -1
  161. package/dist/async/sleep.js +1 -15
  162. package/dist/async/sleep.js.map +1 -1
  163. package/dist/async/taskPool.cjs +1 -1
  164. package/dist/async/taskPool.cjs.map +1 -1
  165. package/dist/async/taskPool.js +1 -50
  166. package/dist/async/taskPool.js.map +1 -1
  167. package/dist/async/waitFor.cjs +1 -1
  168. package/dist/async/waitFor.cjs.map +1 -1
  169. package/dist/async/waitFor.js +1 -12
  170. package/dist/async/waitFor.js.map +1 -1
  171. package/dist/cache/cache.cjs +1 -1
  172. package/dist/cache/cache.cjs.map +1 -1
  173. package/dist/cache/cache.js +1 -59
  174. package/dist/cache/cache.js.map +1 -1
  175. package/dist/cache/index.js +1 -3
  176. package/dist/cache/memo.cjs +1 -1
  177. package/dist/cache/memo.cjs.map +1 -1
  178. package/dist/cache/memo.js +1 -37
  179. package/dist/cache/memo.js.map +1 -1
  180. package/dist/encoding/base64url.cjs +2 -0
  181. package/dist/encoding/base64url.cjs.map +1 -0
  182. package/dist/encoding/base64url.d.ts +9 -0
  183. package/dist/encoding/base64url.d.ts.map +1 -0
  184. package/dist/encoding/base64url.js +2 -0
  185. package/dist/encoding/base64url.js.map +1 -0
  186. package/dist/encoding/index.cjs +1 -0
  187. package/dist/encoding/index.d.ts +2 -0
  188. package/dist/encoding/index.d.ts.map +1 -0
  189. package/dist/encoding/index.js +1 -0
  190. package/dist/errors.cjs +1 -1
  191. package/dist/errors.cjs.map +1 -1
  192. package/dist/errors.js +1 -9
  193. package/dist/errors.js.map +1 -1
  194. package/dist/function/assert.cjs +1 -1
  195. package/dist/function/assert.cjs.map +1 -1
  196. package/dist/function/assert.js +1 -7
  197. package/dist/function/assert.js.map +1 -1
  198. package/dist/function/debounce.cjs +1 -1
  199. package/dist/function/debounce.cjs.map +1 -1
  200. package/dist/function/debounce.js +1 -26
  201. package/dist/function/debounce.js.map +1 -1
  202. package/dist/function/index.cjs +1 -1
  203. package/dist/function/index.d.ts +1 -0
  204. package/dist/function/index.d.ts.map +1 -1
  205. package/dist/function/index.js +1 -8
  206. package/dist/function/once.cjs +1 -1
  207. package/dist/function/once.cjs.map +1 -1
  208. package/dist/function/once.js +1 -10
  209. package/dist/function/once.js.map +1 -1
  210. package/dist/function/pipe.cjs +1 -1
  211. package/dist/function/pipe.cjs.map +1 -1
  212. package/dist/function/pipe.js +1 -9
  213. package/dist/function/pipe.js.map +1 -1
  214. package/dist/function/runAll.cjs +1 -1
  215. package/dist/function/runAll.cjs.map +1 -1
  216. package/dist/function/runAll.js +1 -18
  217. package/dist/function/runAll.js.map +1 -1
  218. package/dist/function/tap.cjs +1 -1
  219. package/dist/function/tap.cjs.map +1 -1
  220. package/dist/function/tap.js +1 -7
  221. package/dist/function/tap.js.map +1 -1
  222. package/dist/function/tapper.cjs +2 -0
  223. package/dist/function/tapper.cjs.map +1 -0
  224. package/dist/function/tapper.d.ts +27 -0
  225. package/dist/function/tapper.d.ts.map +1 -0
  226. package/dist/function/tapper.js +2 -0
  227. package/dist/function/tapper.js.map +1 -0
  228. package/dist/function/throttle.cjs +1 -1
  229. package/dist/function/throttle.cjs.map +1 -1
  230. package/dist/function/throttle.js +1 -35
  231. package/dist/function/throttle.js.map +1 -1
  232. package/dist/guards/combinators.cjs +1 -1
  233. package/dist/guards/combinators.cjs.map +1 -1
  234. package/dist/guards/combinators.js +1 -16
  235. package/dist/guards/combinators.js.map +1 -1
  236. package/dist/guards/index.js +1 -17
  237. package/dist/guards/isAbortError.cjs +1 -1
  238. package/dist/guards/isAbortError.cjs.map +1 -1
  239. package/dist/guards/isAbortError.js +1 -7
  240. package/dist/guards/isAbortError.js.map +1 -1
  241. package/dist/guards/isDate.cjs +1 -1
  242. package/dist/guards/isDate.cjs.map +1 -1
  243. package/dist/guards/isDate.js +1 -7
  244. package/dist/guards/isDate.js.map +1 -1
  245. package/dist/guards/isDefined.cjs +1 -1
  246. package/dist/guards/isDefined.cjs.map +1 -1
  247. package/dist/guards/isDefined.js +1 -7
  248. package/dist/guards/isDefined.js.map +1 -1
  249. package/dist/guards/isEmpty.cjs +1 -1
  250. package/dist/guards/isEmpty.cjs.map +1 -1
  251. package/dist/guards/isEmpty.js +1 -8
  252. package/dist/guards/isEmpty.js.map +1 -1
  253. package/dist/guards/isEqual.cjs +1 -1
  254. package/dist/guards/isEqual.cjs.map +1 -1
  255. package/dist/guards/isEqual.js +1 -33
  256. package/dist/guards/isEqual.js.map +1 -1
  257. package/dist/guards/isError.cjs +1 -1
  258. package/dist/guards/isError.cjs.map +1 -1
  259. package/dist/guards/isError.js +1 -7
  260. package/dist/guards/isError.js.map +1 -1
  261. package/dist/guards/isFunction.cjs +1 -1
  262. package/dist/guards/isFunction.cjs.map +1 -1
  263. package/dist/guards/isFunction.js +1 -7
  264. package/dist/guards/isFunction.js.map +1 -1
  265. package/dist/guards/isMatch.cjs +1 -1
  266. package/dist/guards/isMatch.cjs.map +1 -1
  267. package/dist/guards/isMatch.js +1 -22
  268. package/dist/guards/isMatch.js.map +1 -1
  269. package/dist/guards/isNil.cjs +1 -1
  270. package/dist/guards/isNil.cjs.map +1 -1
  271. package/dist/guards/isNil.js +1 -7
  272. package/dist/guards/isNil.js.map +1 -1
  273. package/dist/guards/isNumber.cjs +1 -1
  274. package/dist/guards/isNumber.cjs.map +1 -1
  275. package/dist/guards/isNumber.js +1 -7
  276. package/dist/guards/isNumber.js.map +1 -1
  277. package/dist/guards/isPlainObject.cjs +1 -1
  278. package/dist/guards/isPlainObject.cjs.map +1 -1
  279. package/dist/guards/isPlainObject.js +1 -9
  280. package/dist/guards/isPlainObject.js.map +1 -1
  281. package/dist/guards/isPrimitive.cjs +1 -1
  282. package/dist/guards/isPrimitive.cjs.map +1 -1
  283. package/dist/guards/isPrimitive.js +1 -7
  284. package/dist/guards/isPrimitive.js.map +1 -1
  285. package/dist/guards/isPromise.cjs +1 -1
  286. package/dist/guards/isPromise.cjs.map +1 -1
  287. package/dist/guards/isPromise.js +1 -7
  288. package/dist/guards/isPromise.js.map +1 -1
  289. package/dist/guards/isRegex.cjs +1 -1
  290. package/dist/guards/isRegex.cjs.map +1 -1
  291. package/dist/guards/isRegex.js +1 -7
  292. package/dist/guards/isRegex.js.map +1 -1
  293. package/dist/guards/shallowEqual.cjs +1 -1
  294. package/dist/guards/shallowEqual.cjs.map +1 -1
  295. package/dist/guards/shallowEqual.js +1 -19
  296. package/dist/guards/shallowEqual.js.map +1 -1
  297. package/dist/index.cjs +1 -1
  298. package/dist/index.d.ts +7 -0
  299. package/dist/index.d.ts.map +1 -1
  300. package/dist/index.js +1 -35
  301. package/dist/math/allocate.cjs +1 -1
  302. package/dist/math/allocate.cjs.map +1 -1
  303. package/dist/math/allocate.js +1 -18
  304. package/dist/math/allocate.js.map +1 -1
  305. package/dist/math/average.cjs +1 -1
  306. package/dist/math/average.cjs.map +1 -1
  307. package/dist/math/average.js +1 -8
  308. package/dist/math/average.js.map +1 -1
  309. package/dist/math/clamp.cjs +1 -1
  310. package/dist/math/clamp.cjs.map +1 -1
  311. package/dist/math/clamp.js +1 -7
  312. package/dist/math/clamp.js.map +1 -1
  313. package/dist/math/gcd.cjs +1 -1
  314. package/dist/math/gcd.cjs.map +1 -1
  315. package/dist/math/gcd.js +1 -13
  316. package/dist/math/gcd.js.map +1 -1
  317. package/dist/math/index.js +1 -16
  318. package/dist/math/lcm.cjs +1 -1
  319. package/dist/math/lcm.cjs.map +1 -1
  320. package/dist/math/lcm.js +1 -12
  321. package/dist/math/lcm.js.map +1 -1
  322. package/dist/math/lerp.cjs +1 -1
  323. package/dist/math/lerp.cjs.map +1 -1
  324. package/dist/math/lerp.js +1 -7
  325. package/dist/math/lerp.js.map +1 -1
  326. package/dist/math/linspace.cjs +1 -1
  327. package/dist/math/linspace.cjs.map +1 -1
  328. package/dist/math/linspace.js +1 -11
  329. package/dist/math/linspace.js.map +1 -1
  330. package/dist/math/median.cjs +1 -1
  331. package/dist/math/median.cjs.map +1 -1
  332. package/dist/math/median.js +1 -11
  333. package/dist/math/median.js.map +1 -1
  334. package/dist/math/mod.cjs +1 -1
  335. package/dist/math/mod.cjs.map +1 -1
  336. package/dist/math/mod.js +1 -8
  337. package/dist/math/mod.js.map +1 -1
  338. package/dist/math/normalize.cjs +1 -1
  339. package/dist/math/normalize.cjs.map +1 -1
  340. package/dist/math/normalize.js +1 -8
  341. package/dist/math/normalize.js.map +1 -1
  342. package/dist/math/range.cjs +1 -1
  343. package/dist/math/range.cjs.map +1 -1
  344. package/dist/math/range.js +1 -25
  345. package/dist/math/range.js.map +1 -1
  346. package/dist/math/round.cjs +1 -1
  347. package/dist/math/round.cjs.map +1 -1
  348. package/dist/math/round.js +1 -9
  349. package/dist/math/round.js.map +1 -1
  350. package/dist/math/standardDeviation.cjs +1 -1
  351. package/dist/math/standardDeviation.cjs.map +1 -1
  352. package/dist/math/standardDeviation.js +1 -8
  353. package/dist/math/standardDeviation.js.map +1 -1
  354. package/dist/math/sum.cjs +1 -1
  355. package/dist/math/sum.cjs.map +1 -1
  356. package/dist/math/sum.js +1 -11
  357. package/dist/math/sum.js.map +1 -1
  358. package/dist/math/variance.cjs +1 -1
  359. package/dist/math/variance.cjs.map +1 -1
  360. package/dist/math/variance.js +1 -10
  361. package/dist/math/variance.js.map +1 -1
  362. package/dist/object/defaults.cjs +1 -1
  363. package/dist/object/defaults.cjs.map +1 -1
  364. package/dist/object/defaults.js +1 -11
  365. package/dist/object/defaults.js.map +1 -1
  366. package/dist/object/diff.cjs +1 -1
  367. package/dist/object/diff.cjs.map +1 -1
  368. package/dist/object/diff.js +1 -26
  369. package/dist/object/diff.js.map +1 -1
  370. package/dist/object/filterValues.cjs +1 -1
  371. package/dist/object/filterValues.cjs.map +1 -1
  372. package/dist/object/filterValues.js +1 -10
  373. package/dist/object/filterValues.js.map +1 -1
  374. package/dist/object/flattenPaths.cjs +1 -1
  375. package/dist/object/flattenPaths.cjs.map +1 -1
  376. package/dist/object/flattenPaths.js +1 -30
  377. package/dist/object/flattenPaths.js.map +1 -1
  378. package/dist/object/getPath.cjs +1 -1
  379. package/dist/object/getPath.cjs.map +1 -1
  380. package/dist/object/getPath.js +1 -25
  381. package/dist/object/getPath.js.map +1 -1
  382. package/dist/object/hash.cjs +1 -1
  383. package/dist/object/hash.cjs.map +1 -1
  384. package/dist/object/hash.js +1 -27
  385. package/dist/object/hash.js.map +1 -1
  386. package/dist/object/index.js +1 -15
  387. package/dist/object/invert.cjs +1 -1
  388. package/dist/object/invert.cjs.map +1 -1
  389. package/dist/object/invert.js +1 -10
  390. package/dist/object/invert.js.map +1 -1
  391. package/dist/object/mapKeys.cjs +1 -1
  392. package/dist/object/mapKeys.cjs.map +1 -1
  393. package/dist/object/mapKeys.js +1 -14
  394. package/dist/object/mapKeys.js.map +1 -1
  395. package/dist/object/mapValues.cjs +1 -1
  396. package/dist/object/mapValues.cjs.map +1 -1
  397. package/dist/object/mapValues.js +1 -10
  398. package/dist/object/mapValues.js.map +1 -1
  399. package/dist/object/merge.cjs +1 -1
  400. package/dist/object/merge.cjs.map +1 -1
  401. package/dist/object/merge.js +1 -25
  402. package/dist/object/merge.js.map +1 -1
  403. package/dist/object/omit.cjs +1 -1
  404. package/dist/object/omit.cjs.map +1 -1
  405. package/dist/object/omit.js +1 -10
  406. package/dist/object/omit.js.map +1 -1
  407. package/dist/object/pick.cjs +1 -1
  408. package/dist/object/pick.cjs.map +1 -1
  409. package/dist/object/pick.js +1 -10
  410. package/dist/object/pick.js.map +1 -1
  411. package/dist/object/prune.cjs +1 -1
  412. package/dist/object/prune.cjs.map +1 -1
  413. package/dist/object/prune.js +1 -33
  414. package/dist/object/prune.js.map +1 -1
  415. package/dist/object/tryParseJson.cjs +1 -1
  416. package/dist/object/tryParseJson.cjs.map +1 -1
  417. package/dist/object/tryParseJson.js +1 -17
  418. package/dist/object/tryParseJson.js.map +1 -1
  419. package/dist/random/_index.cjs +1 -1
  420. package/dist/random/_index.cjs.map +1 -1
  421. package/dist/random/_index.js +1 -8
  422. package/dist/random/_index.js.map +1 -1
  423. package/dist/random/draw.cjs +1 -1
  424. package/dist/random/draw.cjs.map +1 -1
  425. package/dist/random/draw.js +1 -20
  426. package/dist/random/draw.js.map +1 -1
  427. package/dist/random/index.js +1 -5
  428. package/dist/random/random.cjs +1 -1
  429. package/dist/random/random.cjs.map +1 -1
  430. package/dist/random/random.js +1 -9
  431. package/dist/random/random.js.map +1 -1
  432. package/dist/random/shuffle.cjs +1 -1
  433. package/dist/random/shuffle.cjs.map +1 -1
  434. package/dist/random/shuffle.js +1 -13
  435. package/dist/random/shuffle.js.map +1 -1
  436. package/dist/random/source.cjs +1 -1
  437. package/dist/random/source.cjs.map +1 -1
  438. package/dist/random/source.js +1 -9
  439. package/dist/random/source.js.map +1 -1
  440. package/dist/string/_caseUtils.cjs +1 -1
  441. package/dist/string/_caseUtils.cjs.map +1 -1
  442. package/dist/string/_caseUtils.js +1 -12
  443. package/dist/string/_caseUtils.js.map +1 -1
  444. package/dist/string/camelCase.cjs +1 -1
  445. package/dist/string/camelCase.cjs.map +1 -1
  446. package/dist/string/camelCase.js +1 -8
  447. package/dist/string/camelCase.js.map +1 -1
  448. package/dist/string/escape.cjs +1 -1
  449. package/dist/string/escape.cjs.map +1 -1
  450. package/dist/string/escape.js +1 -14
  451. package/dist/string/escape.js.map +1 -1
  452. package/dist/string/index.js +1 -12
  453. package/dist/string/kebabCase.cjs +1 -1
  454. package/dist/string/kebabCase.cjs.map +1 -1
  455. package/dist/string/kebabCase.js +1 -8
  456. package/dist/string/kebabCase.js.map +1 -1
  457. package/dist/string/padCenter.cjs +1 -1
  458. package/dist/string/padCenter.cjs.map +1 -1
  459. package/dist/string/padCenter.js +1 -9
  460. package/dist/string/padCenter.js.map +1 -1
  461. package/dist/string/pascalCase.cjs +1 -1
  462. package/dist/string/pascalCase.cjs.map +1 -1
  463. package/dist/string/pascalCase.js +1 -8
  464. package/dist/string/pascalCase.js.map +1 -1
  465. package/dist/string/similarity.cjs +1 -1
  466. package/dist/string/similarity.cjs.map +1 -1
  467. package/dist/string/similarity.js +1 -22
  468. package/dist/string/similarity.js.map +1 -1
  469. package/dist/string/snakeCase.cjs +1 -1
  470. package/dist/string/snakeCase.cjs.map +1 -1
  471. package/dist/string/snakeCase.js +1 -8
  472. package/dist/string/snakeCase.js.map +1 -1
  473. package/dist/string/titleCase.cjs +1 -1
  474. package/dist/string/titleCase.cjs.map +1 -1
  475. package/dist/string/titleCase.js +1 -8
  476. package/dist/string/titleCase.js.map +1 -1
  477. package/dist/string/truncate.cjs +1 -1
  478. package/dist/string/truncate.cjs.map +1 -1
  479. package/dist/string/truncate.js +1 -15
  480. package/dist/string/truncate.js.map +1 -1
  481. package/dist/string/unescape.cjs +1 -1
  482. package/dist/string/unescape.cjs.map +1 -1
  483. package/dist/string/unescape.js +1 -14
  484. package/dist/string/unescape.js.map +1 -1
  485. package/dist/string/words.cjs +1 -1
  486. package/dist/string/words.cjs.map +1 -1
  487. package/dist/string/words.js +1 -9
  488. package/dist/string/words.js.map +1 -1
  489. package/dist/types.d.ts +10 -0
  490. package/dist/types.d.ts.map +1 -1
  491. package/package.json +13 -5
@@ -1 +1 @@
1
- {"version":3,"file":"escape.js","names":[],"sources":["../../src/string/escape.ts"],"sourcesContent":["const escapeMap: Record<string, string> = {\n \"'\": '&#39;',\n '\"': '&quot;',\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n};\n\n/**\n * Escapes HTML entities.\n */\nexport function escape(value: string): string {\n return value.replace(/[&<>\"']/g, (char) => escapeMap[char]);\n}\n"],"mappings":";AAAA,IAAM,IAAoC;CACxC,KAAK;CACL,MAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;AACP;AAKA,SAAgB,EAAO,GAAuB;CAC5C,OAAO,EAAM,QAAQ,aAAa,MAAS,EAAU,EAAK;AAC5D"}
1
+ {"version":3,"file":"escape.js","names":[],"sources":["../../src/string/escape.ts"],"sourcesContent":["const escapeMap: Record<string, string> = {\n \"'\": '&#39;',\n '\"': '&quot;',\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n};\n\n/**\n * Escapes HTML entities.\n */\nexport function escape(value: string): string {\n return value.replace(/[&<>\"']/g, (char) => escapeMap[char]);\n}\n"],"mappings":"AAAA,IAAM,EAAoC,CACxC,IAAK,QACL,IAAK,SACL,IAAK,QACL,IAAK,OACL,IAAK,MACP,EAKA,SAAgB,OAAO,EAAuB,CAC5C,OAAO,EAAM,QAAQ,WAAa,GAAS,EAAU,EAAK,CAC5D"}
@@ -1,12 +1 @@
1
- import { similarity as e } from "./similarity.js";
2
- import { camelCase as t } from "./camelCase.js";
3
- import { escape as n } from "./escape.js";
4
- import { kebabCase as r } from "./kebabCase.js";
5
- import { padCenter as i } from "./padCenter.js";
6
- import { pascalCase as a } from "./pascalCase.js";
7
- import { snakeCase as o } from "./snakeCase.js";
8
- import { words as s } from "./words.js";
9
- import { titleCase as c } from "./titleCase.js";
10
- import { truncate as l } from "./truncate.js";
11
- import { unescape as u } from "./unescape.js";
12
- export { t as camelCase, n as escape, r as kebabCase, i as padCenter, a as pascalCase, e as similarity, o as snakeCase, c as titleCase, l as truncate, u as unescape, s as words };
1
+ import{similarity as e}from"./similarity.js";import{camelCase as t}from"./camelCase.js";import{escape as n}from"./escape.js";import{kebabCase as r}from"./kebabCase.js";import{padCenter as i}from"./padCenter.js";import{pascalCase as a}from"./pascalCase.js";import{snakeCase as o}from"./snakeCase.js";import{words as s}from"./words.js";import{titleCase as c}from"./titleCase.js";import{truncate as l}from"./truncate.js";import{unescape as u}from"./unescape.js";export{t as camelCase,n as escape,r as kebabCase,i as padCenter,a as pascalCase,e as similarity,o as snakeCase,c as titleCase,l as truncate,u as unescape,s as words};
@@ -1,2 +1,2 @@
1
- const e=require("./_caseUtils.cjs");function t(t){return e.normalizeCase(t,`-`).toLowerCase()}exports.kebabCase=t;
1
+ const e=require("./_caseUtils.cjs");function kebabCase(t){return e.normalizeCase(t,`-`).toLowerCase()}exports.kebabCase=kebabCase;
2
2
  //# sourceMappingURL=kebabCase.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kebabCase.cjs","names":[],"sources":["../../src/string/kebabCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to kebab case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * kebabCase(text); // 'hello-world'\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function kebabCase(str: string): string {\n return normalizeCase(str, '-').toLowerCase();\n}\n"],"mappings":"oCAeA,SAAgB,EAAU,EAAqB,CAC7C,OAAO,EAAA,cAAc,EAAK,GAAG,CAAC,CAAC,YAAY,CAC7C"}
1
+ {"version":3,"file":"kebabCase.cjs","names":[],"sources":["../../src/string/kebabCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to kebab case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * kebabCase(text); // 'hello-world'\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function kebabCase(str: string): string {\n return normalizeCase(str, '-').toLowerCase();\n}\n"],"mappings":"oCAeA,SAAgB,UAAU,EAAqB,CAC7C,OAAO,EAAA,cAAc,EAAK,GAAG,CAAC,CAAC,YAAY,CAC7C"}
@@ -1,9 +1,2 @@
1
- import { normalizeCase as e } from "./_caseUtils.js";
2
- //#region src/string/kebabCase.ts
3
- function t(t) {
4
- return e(t, "-").toLowerCase();
5
- }
6
- //#endregion
7
- export { t as kebabCase };
8
-
1
+ import{normalizeCase as e}from"./_caseUtils.js";function kebabCase(t){return e(t,`-`).toLowerCase()}export{kebabCase};
9
2
  //# sourceMappingURL=kebabCase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kebabCase.js","names":[],"sources":["../../src/string/kebabCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to kebab case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * kebabCase(text); // 'hello-world'\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function kebabCase(str: string): string {\n return normalizeCase(str, '-').toLowerCase();\n}\n"],"mappings":";;AAeA,SAAgB,EAAU,GAAqB;CAC7C,OAAO,EAAc,GAAK,GAAG,CAAC,CAAC,YAAY;AAC7C"}
1
+ {"version":3,"file":"kebabCase.js","names":[],"sources":["../../src/string/kebabCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to kebab case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * kebabCase(text); // 'hello-world'\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function kebabCase(str: string): string {\n return normalizeCase(str, '-').toLowerCase();\n}\n"],"mappings":"gDAeA,SAAgB,UAAU,EAAqB,CAC7C,OAAO,EAAc,EAAK,GAAG,CAAC,CAAC,YAAY,CAC7C"}
@@ -1,2 +1,2 @@
1
- function e(e,t,n=` `){if(t<=e.length)return e;let r=t-e.length,i=Math.floor(r/2);return e.padStart(e.length+i,n).padEnd(t,n)}exports.padCenter=e;
1
+ function padCenter(e,t,n=` `){if(t<=e.length)return e;let r=t-e.length,i=Math.floor(r/2);return e.padStart(e.length+i,n).padEnd(t,n)}exports.padCenter=padCenter;
2
2
  //# sourceMappingURL=padCenter.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"padCenter.cjs","names":[],"sources":["../../src/string/padCenter.ts"],"sourcesContent":["/** Pads both sides of a string to reach `targetLength`. */\nexport function padCenter(value: string, targetLength: number, fill = ' '): string {\n if (targetLength <= value.length) return value;\n\n const total = targetLength - value.length;\n const left = Math.floor(total / 2);\n\n return value.padStart(value.length + left, fill).padEnd(targetLength, fill);\n}\n"],"mappings":"AACA,SAAgB,EAAU,EAAe,EAAsB,EAAO,IAAa,CACjF,GAAI,GAAgB,EAAM,OAAQ,OAAO,EAEzC,IAAM,EAAQ,EAAe,EAAM,OAC7B,EAAO,KAAK,MAAM,EAAQ,CAAC,EAEjC,OAAO,EAAM,SAAS,EAAM,OAAS,EAAM,CAAI,CAAC,CAAC,OAAO,EAAc,CAAI,CAC5E"}
1
+ {"version":3,"file":"padCenter.cjs","names":[],"sources":["../../src/string/padCenter.ts"],"sourcesContent":["/** Pads both sides of a string to reach `targetLength`. */\nexport function padCenter(value: string, targetLength: number, fill = ' '): string {\n if (targetLength <= value.length) return value;\n\n const total = targetLength - value.length;\n const left = Math.floor(total / 2);\n\n return value.padStart(value.length + left, fill).padEnd(targetLength, fill);\n}\n"],"mappings":"AACA,SAAgB,UAAU,EAAe,EAAsB,EAAO,IAAa,CACjF,GAAI,GAAgB,EAAM,OAAQ,OAAO,EAEzC,IAAM,EAAQ,EAAe,EAAM,OAC7B,EAAO,KAAK,MAAM,EAAQ,CAAC,EAEjC,OAAO,EAAM,SAAS,EAAM,OAAS,EAAM,CAAI,CAAC,CAAC,OAAO,EAAc,CAAI,CAC5E"}
@@ -1,10 +1,2 @@
1
- //#region src/string/padCenter.ts
2
- function e(e, t, n = " ") {
3
- if (t <= e.length) return e;
4
- let r = t - e.length, i = Math.floor(r / 2);
5
- return e.padStart(e.length + i, n).padEnd(t, n);
6
- }
7
- //#endregion
8
- export { e as padCenter };
9
-
1
+ function padCenter(e,t,n=` `){if(t<=e.length)return e;let r=t-e.length,i=Math.floor(r/2);return e.padStart(e.length+i,n).padEnd(t,n)}export{padCenter};
10
2
  //# sourceMappingURL=padCenter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"padCenter.js","names":[],"sources":["../../src/string/padCenter.ts"],"sourcesContent":["/** Pads both sides of a string to reach `targetLength`. */\nexport function padCenter(value: string, targetLength: number, fill = ' '): string {\n if (targetLength <= value.length) return value;\n\n const total = targetLength - value.length;\n const left = Math.floor(total / 2);\n\n return value.padStart(value.length + left, fill).padEnd(targetLength, fill);\n}\n"],"mappings":";AACA,SAAgB,EAAU,GAAe,GAAsB,IAAO,KAAa;CACjF,IAAI,KAAgB,EAAM,QAAQ,OAAO;CAEzC,IAAM,IAAQ,IAAe,EAAM,QAC7B,IAAO,KAAK,MAAM,IAAQ,CAAC;CAEjC,OAAO,EAAM,SAAS,EAAM,SAAS,GAAM,CAAI,CAAC,CAAC,OAAO,GAAc,CAAI;AAC5E"}
1
+ {"version":3,"file":"padCenter.js","names":[],"sources":["../../src/string/padCenter.ts"],"sourcesContent":["/** Pads both sides of a string to reach `targetLength`. */\nexport function padCenter(value: string, targetLength: number, fill = ' '): string {\n if (targetLength <= value.length) return value;\n\n const total = targetLength - value.length;\n const left = Math.floor(total / 2);\n\n return value.padStart(value.length + left, fill).padEnd(targetLength, fill);\n}\n"],"mappings":"AACA,SAAgB,UAAU,EAAe,EAAsB,EAAO,IAAa,CACjF,GAAI,GAAgB,EAAM,OAAQ,OAAO,EAEzC,IAAM,EAAQ,EAAe,EAAM,OAC7B,EAAO,KAAK,MAAM,EAAQ,CAAC,EAEjC,OAAO,EAAM,SAAS,EAAM,OAAS,EAAM,CAAI,CAAC,CAAC,OAAO,EAAc,CAAI,CAC5E"}
@@ -1,2 +1,2 @@
1
- const e=require("./_caseUtils.cjs");function t(t){return e.normalizeCase(t,` `).replace(/(?:^|\s)(\p{L}|\p{N})/gu,(e,t)=>t.toUpperCase()).replace(/\s+/g,``)}exports.pascalCase=t;
1
+ const e=require("./_caseUtils.cjs");function pascalCase(t){return e.normalizeCase(t,` `).replace(/(?:^|\s)(\p{L}|\p{N})/gu,(e,t)=>t.toUpperCase()).replace(/\s+/g,``)}exports.pascalCase=pascalCase;
2
2
  //# sourceMappingURL=pascalCase.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pascalCase.cjs","names":[],"sources":["../../src/string/pascalCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to Pascal case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * pascalCase(text) // 'HelloWorld';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function pascalCase(str: string): string {\n return normalizeCase(str, ' ')\n .replace(/(?:^|\\s)(\\p{L}|\\p{N})/gu, (_, char) => char.toUpperCase())\n .replace(/\\s+/g, '');\n}\n"],"mappings":"oCAeA,SAAgB,EAAW,EAAqB,CAC9C,OAAO,EAAA,cAAc,EAAK,GAAG,CAAC,CAC3B,QAAQ,2BAA4B,EAAG,IAAS,EAAK,YAAY,CAAC,CAAC,CACnE,QAAQ,OAAQ,EAAE,CACvB"}
1
+ {"version":3,"file":"pascalCase.cjs","names":[],"sources":["../../src/string/pascalCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to Pascal case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * pascalCase(text) // 'HelloWorld';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function pascalCase(str: string): string {\n return normalizeCase(str, ' ')\n .replace(/(?:^|\\s)(\\p{L}|\\p{N})/gu, (_, char) => char.toUpperCase())\n .replace(/\\s+/g, '');\n}\n"],"mappings":"oCAeA,SAAgB,WAAW,EAAqB,CAC9C,OAAO,EAAA,cAAc,EAAK,GAAG,CAAC,CAC3B,QAAQ,2BAA4B,EAAG,IAAS,EAAK,YAAY,CAAC,CAAC,CACnE,QAAQ,OAAQ,EAAE,CACvB"}
@@ -1,9 +1,2 @@
1
- import { normalizeCase as e } from "./_caseUtils.js";
2
- //#region src/string/pascalCase.ts
3
- function t(t) {
4
- return e(t, " ").replace(/(?:^|\s)(\p{L}|\p{N})/gu, (e, t) => t.toUpperCase()).replace(/\s+/g, "");
5
- }
6
- //#endregion
7
- export { t as pascalCase };
8
-
1
+ import{normalizeCase as e}from"./_caseUtils.js";function pascalCase(t){return e(t,` `).replace(/(?:^|\s)(\p{L}|\p{N})/gu,(e,t)=>t.toUpperCase()).replace(/\s+/g,``)}export{pascalCase};
9
2
  //# sourceMappingURL=pascalCase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pascalCase.js","names":[],"sources":["../../src/string/pascalCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to Pascal case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * pascalCase(text) // 'HelloWorld';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function pascalCase(str: string): string {\n return normalizeCase(str, ' ')\n .replace(/(?:^|\\s)(\\p{L}|\\p{N})/gu, (_, char) => char.toUpperCase())\n .replace(/\\s+/g, '');\n}\n"],"mappings":";;AAeA,SAAgB,EAAW,GAAqB;CAC9C,OAAO,EAAc,GAAK,GAAG,CAAC,CAC3B,QAAQ,4BAA4B,GAAG,MAAS,EAAK,YAAY,CAAC,CAAC,CACnE,QAAQ,QAAQ,EAAE;AACvB"}
1
+ {"version":3,"file":"pascalCase.js","names":[],"sources":["../../src/string/pascalCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to Pascal case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * pascalCase(text) // 'HelloWorld';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function pascalCase(str: string): string {\n return normalizeCase(str, ' ')\n .replace(/(?:^|\\s)(\\p{L}|\\p{N})/gu, (_, char) => char.toUpperCase())\n .replace(/\\s+/g, '');\n}\n"],"mappings":"gDAeA,SAAgB,WAAW,EAAqB,CAC9C,OAAO,EAAc,EAAK,GAAG,CAAC,CAC3B,QAAQ,2BAA4B,EAAG,IAAS,EAAK,YAAY,CAAC,CAAC,CACnE,QAAQ,OAAQ,EAAE,CACvB"}
@@ -1,2 +1,2 @@
1
- var e=1e4;function t(t,n){if(t.length>e||n.length>e)throw RangeError(`similarity: input strings must not exceed ${e} characters to prevent excessive memory usage`);let r=t.toLowerCase(),i=n.toLowerCase();if(r===i)return 1;if(r.length===0)return+(i.length===0);if(i.length===0)return 0;let[a,o]=r.length<i.length?[r,i]:[i,r],s=a.length,c=o.length,l=Array.from({length:s+1},(e,t)=>t),u=Array(s+1);for(let e=1;e<=c;e++){u[0]=e;for(let t=1;t<=s;t++){let n=o[e-1]===a[t-1]?0:1;u[t]=Math.min(u[t-1]+1,l[t]+1,l[t-1]+n)}[l,u]=[u,l]}return 1-l[s]/Math.max(r.length,i.length)}exports.similarity=t;
1
+ var e=1e4;function similarity(t,n){if(t.length>e||n.length>e)throw RangeError(`similarity: input strings must not exceed ${e} characters to prevent excessive memory usage`);let r=t.toLowerCase(),i=n.toLowerCase();if(r===i)return 1;if(r.length===0)return+(i.length===0);if(i.length===0)return 0;let[a,o]=r.length<i.length?[r,i]:[i,r],s=a.length,c=o.length,l=Array.from({length:s+1},(e,t)=>t),u=Array(s+1);for(let e=1;e<=c;e++){u[0]=e;for(let t=1;t<=s;t++){let n=o[e-1]===a[t-1]?0:1;u[t]=Math.min(u[t-1]+1,l[t]+1,l[t-1]+n)}[l,u]=[u,l]}return 1-l[s]/Math.max(r.length,i.length)}exports.similarity=similarity;
2
2
  //# sourceMappingURL=similarity.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"similarity.cjs","names":[],"sources":["../../src/string/similarity.ts"],"sourcesContent":["/**\n * Calculate the similarity between two strings using the Levenshtein distance algorithm.\n *\n * @example\n * ```ts\n * similarity('abc', 'abc') // 1\n * similarity('a', 'b') // 0\n * similarity('ab', 'ac') // 0.5\n * similarity('doe', 'John Doe') // 0.25\n * similarity('abc', 'axc') // 0.6666666666666667\n * similarity('kitten', 'sitting') // 0.5714285714285714\n * ```\n *\n * @param str1 - The first string.\n * @param str2 - The second string.\n *\n * @returns A number between 0 and 1 representing the similarity between the two strings.\n *\n * @throws {RangeError} If either input string exceeds 10 000 characters.\n */\nconst MAX_SIMILARITY_LENGTH = 10_000;\n\nexport function similarity(str1: string, str2: string): number {\n if (str1.length > MAX_SIMILARITY_LENGTH || str2.length > MAX_SIMILARITY_LENGTH) {\n throw new RangeError(\n `similarity: input strings must not exceed ${MAX_SIMILARITY_LENGTH} characters to prevent excessive memory usage`,\n );\n }\n\n const a = str1.toLowerCase();\n const b = str2.toLowerCase();\n\n if (a === b) return 1;\n\n if (a.length === 0) return b.length === 0 ? 1 : 0;\n\n if (b.length === 0) return 0;\n\n // Swap to ensure we use the smaller string for columns (O(min(A,B)) space)\n const [shorter, longer] = a.length < b.length ? [a, b] : [b, a];\n const shorterLength = shorter.length;\n const longerLength = longer.length;\n\n let prevRow = Array.from({ length: shorterLength + 1 }, (_, i) => i);\n let currRow = new Array(shorterLength + 1);\n\n for (let i = 1; i <= longerLength; i++) {\n currRow[0] = i;\n for (let j = 1; j <= shorterLength; j++) {\n const cost = longer[i - 1] === shorter[j - 1] ? 0 : 1;\n\n currRow[j] = Math.min(\n currRow[j - 1] + 1, // insertion\n prevRow[j] + 1, // deletion\n prevRow[j - 1] + cost, // substitution\n );\n }\n // Swap rows for the next iteration (avoid allocation)\n [prevRow, currRow] = [currRow, prevRow];\n }\n\n // After the loop, a result is in prevRow because of the swap\n const distance = prevRow[shorterLength];\n\n return 1 - distance / Math.max(a.length, b.length);\n}\n"],"mappings":"AAoBA,IAAM,EAAwB,IAE9B,SAAgB,EAAW,EAAc,EAAsB,CAC7D,GAAI,EAAK,OAAS,GAAyB,EAAK,OAAS,EACvD,MAAU,WACR,6CAA6C,EAAsB,8CACrE,EAGF,IAAM,EAAI,EAAK,YAAY,EACrB,EAAI,EAAK,YAAY,EAE3B,GAAI,IAAM,EAAG,MAAO,GAEpB,GAAI,EAAE,SAAW,EAAG,MAAO,IAAE,SAAW,GAExC,GAAI,EAAE,SAAW,EAAG,MAAO,GAG3B,GAAM,CAAC,EAAS,GAAU,EAAE,OAAS,EAAE,OAAS,CAAC,EAAG,CAAC,EAAI,CAAC,EAAG,CAAC,EACxD,EAAgB,EAAQ,OACxB,EAAe,EAAO,OAExB,EAAU,MAAM,KAAK,CAAE,OAAQ,EAAgB,CAAE,GAAI,EAAG,IAAM,CAAC,EAC/D,EAAc,MAAM,EAAgB,CAAC,EAEzC,IAAK,IAAI,EAAI,EAAG,GAAK,EAAc,IAAK,CACtC,EAAQ,GAAK,EACb,IAAK,IAAI,EAAI,EAAG,GAAK,EAAe,IAAK,CACvC,IAAM,EAAO,EAAO,EAAI,KAAO,EAAQ,EAAI,GAAK,EAAI,EAEpD,EAAQ,GAAK,KAAK,IAChB,EAAQ,EAAI,GAAK,EACjB,EAAQ,GAAK,EACb,EAAQ,EAAI,GAAK,CACnB,CACF,CAEA,CAAC,EAAS,GAAW,CAAC,EAAS,CAAO,CACxC,CAKA,MAAO,GAFU,EAAQ,GAEH,KAAK,IAAI,EAAE,OAAQ,EAAE,MAAM,CACnD"}
1
+ {"version":3,"file":"similarity.cjs","names":[],"sources":["../../src/string/similarity.ts"],"sourcesContent":["/**\n * Calculate the similarity between two strings using the Levenshtein distance algorithm.\n *\n * @example\n * ```ts\n * similarity('abc', 'abc') // 1\n * similarity('a', 'b') // 0\n * similarity('ab', 'ac') // 0.5\n * similarity('doe', 'John Doe') // 0.25\n * similarity('abc', 'axc') // 0.6666666666666667\n * similarity('kitten', 'sitting') // 0.5714285714285714\n * ```\n *\n * @param str1 - The first string.\n * @param str2 - The second string.\n *\n * @returns A number between 0 and 1 representing the similarity between the two strings.\n *\n * @throws {RangeError} If either input string exceeds 10 000 characters.\n */\nconst MAX_SIMILARITY_LENGTH = 10_000;\n\nexport function similarity(str1: string, str2: string): number {\n if (str1.length > MAX_SIMILARITY_LENGTH || str2.length > MAX_SIMILARITY_LENGTH) {\n throw new RangeError(\n `similarity: input strings must not exceed ${MAX_SIMILARITY_LENGTH} characters to prevent excessive memory usage`,\n );\n }\n\n const a = str1.toLowerCase();\n const b = str2.toLowerCase();\n\n if (a === b) return 1;\n\n if (a.length === 0) return b.length === 0 ? 1 : 0;\n\n if (b.length === 0) return 0;\n\n // Swap to ensure we use the smaller string for columns (O(min(A,B)) space)\n const [shorter, longer] = a.length < b.length ? [a, b] : [b, a];\n const shorterLength = shorter.length;\n const longerLength = longer.length;\n\n let prevRow = Array.from({ length: shorterLength + 1 }, (_, i) => i);\n let currRow = new Array(shorterLength + 1);\n\n for (let i = 1; i <= longerLength; i++) {\n currRow[0] = i;\n for (let j = 1; j <= shorterLength; j++) {\n const cost = longer[i - 1] === shorter[j - 1] ? 0 : 1;\n\n currRow[j] = Math.min(\n currRow[j - 1] + 1, // insertion\n prevRow[j] + 1, // deletion\n prevRow[j - 1] + cost, // substitution\n );\n }\n // Swap rows for the next iteration (avoid allocation)\n [prevRow, currRow] = [currRow, prevRow];\n }\n\n // After the loop, a result is in prevRow because of the swap\n const distance = prevRow[shorterLength];\n\n return 1 - distance / Math.max(a.length, b.length);\n}\n"],"mappings":"AAoBA,IAAM,EAAwB,IAE9B,SAAgB,WAAW,EAAc,EAAsB,CAC7D,GAAI,EAAK,OAAS,GAAyB,EAAK,OAAS,EACvD,MAAU,WACR,6CAA6C,EAAsB,8CACrE,EAGF,IAAM,EAAI,EAAK,YAAY,EACrB,EAAI,EAAK,YAAY,EAE3B,GAAI,IAAM,EAAG,MAAO,GAEpB,GAAI,EAAE,SAAW,EAAG,MAAO,IAAE,SAAW,GAExC,GAAI,EAAE,SAAW,EAAG,MAAO,GAG3B,GAAM,CAAC,EAAS,GAAU,EAAE,OAAS,EAAE,OAAS,CAAC,EAAG,CAAC,EAAI,CAAC,EAAG,CAAC,EACxD,EAAgB,EAAQ,OACxB,EAAe,EAAO,OAExB,EAAU,MAAM,KAAK,CAAE,OAAQ,EAAgB,CAAE,GAAI,EAAG,IAAM,CAAC,EAC/D,EAAc,MAAM,EAAgB,CAAC,EAEzC,IAAK,IAAI,EAAI,EAAG,GAAK,EAAc,IAAK,CACtC,EAAQ,GAAK,EACb,IAAK,IAAI,EAAI,EAAG,GAAK,EAAe,IAAK,CACvC,IAAM,EAAO,EAAO,EAAI,KAAO,EAAQ,EAAI,GAAK,EAAI,EAEpD,EAAQ,GAAK,KAAK,IAChB,EAAQ,EAAI,GAAK,EACjB,EAAQ,GAAK,EACb,EAAQ,EAAI,GAAK,CACnB,CACF,CAEA,CAAC,EAAS,GAAW,CAAC,EAAS,CAAO,CACxC,CAKA,MAAO,GAFU,EAAQ,GAEH,KAAK,IAAI,EAAE,OAAQ,EAAE,MAAM,CACnD"}
@@ -1,23 +1,2 @@
1
- //#region src/string/similarity.ts
2
- var e = 1e4;
3
- function t(t, n) {
4
- if (t.length > e || n.length > e) throw RangeError(`similarity: input strings must not exceed ${e} characters to prevent excessive memory usage`);
5
- let r = t.toLowerCase(), i = n.toLowerCase();
6
- if (r === i) return 1;
7
- if (r.length === 0) return +(i.length === 0);
8
- if (i.length === 0) return 0;
9
- let [a, o] = r.length < i.length ? [r, i] : [i, r], s = a.length, c = o.length, l = Array.from({ length: s + 1 }, (e, t) => t), u = Array(s + 1);
10
- for (let e = 1; e <= c; e++) {
11
- u[0] = e;
12
- for (let t = 1; t <= s; t++) {
13
- let n = o[e - 1] === a[t - 1] ? 0 : 1;
14
- u[t] = Math.min(u[t - 1] + 1, l[t] + 1, l[t - 1] + n);
15
- }
16
- [l, u] = [u, l];
17
- }
18
- return 1 - l[s] / Math.max(r.length, i.length);
19
- }
20
- //#endregion
21
- export { t as similarity };
22
-
1
+ var e=1e4;function similarity(t,n){if(t.length>e||n.length>e)throw RangeError(`similarity: input strings must not exceed ${e} characters to prevent excessive memory usage`);let r=t.toLowerCase(),i=n.toLowerCase();if(r===i)return 1;if(r.length===0)return+(i.length===0);if(i.length===0)return 0;let[a,o]=r.length<i.length?[r,i]:[i,r],s=a.length,c=o.length,l=Array.from({length:s+1},(e,t)=>t),u=Array(s+1);for(let e=1;e<=c;e++){u[0]=e;for(let t=1;t<=s;t++){let n=o[e-1]===a[t-1]?0:1;u[t]=Math.min(u[t-1]+1,l[t]+1,l[t-1]+n)}[l,u]=[u,l]}return 1-l[s]/Math.max(r.length,i.length)}export{similarity};
23
2
  //# sourceMappingURL=similarity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"similarity.js","names":[],"sources":["../../src/string/similarity.ts"],"sourcesContent":["/**\n * Calculate the similarity between two strings using the Levenshtein distance algorithm.\n *\n * @example\n * ```ts\n * similarity('abc', 'abc') // 1\n * similarity('a', 'b') // 0\n * similarity('ab', 'ac') // 0.5\n * similarity('doe', 'John Doe') // 0.25\n * similarity('abc', 'axc') // 0.6666666666666667\n * similarity('kitten', 'sitting') // 0.5714285714285714\n * ```\n *\n * @param str1 - The first string.\n * @param str2 - The second string.\n *\n * @returns A number between 0 and 1 representing the similarity between the two strings.\n *\n * @throws {RangeError} If either input string exceeds 10 000 characters.\n */\nconst MAX_SIMILARITY_LENGTH = 10_000;\n\nexport function similarity(str1: string, str2: string): number {\n if (str1.length > MAX_SIMILARITY_LENGTH || str2.length > MAX_SIMILARITY_LENGTH) {\n throw new RangeError(\n `similarity: input strings must not exceed ${MAX_SIMILARITY_LENGTH} characters to prevent excessive memory usage`,\n );\n }\n\n const a = str1.toLowerCase();\n const b = str2.toLowerCase();\n\n if (a === b) return 1;\n\n if (a.length === 0) return b.length === 0 ? 1 : 0;\n\n if (b.length === 0) return 0;\n\n // Swap to ensure we use the smaller string for columns (O(min(A,B)) space)\n const [shorter, longer] = a.length < b.length ? [a, b] : [b, a];\n const shorterLength = shorter.length;\n const longerLength = longer.length;\n\n let prevRow = Array.from({ length: shorterLength + 1 }, (_, i) => i);\n let currRow = new Array(shorterLength + 1);\n\n for (let i = 1; i <= longerLength; i++) {\n currRow[0] = i;\n for (let j = 1; j <= shorterLength; j++) {\n const cost = longer[i - 1] === shorter[j - 1] ? 0 : 1;\n\n currRow[j] = Math.min(\n currRow[j - 1] + 1, // insertion\n prevRow[j] + 1, // deletion\n prevRow[j - 1] + cost, // substitution\n );\n }\n // Swap rows for the next iteration (avoid allocation)\n [prevRow, currRow] = [currRow, prevRow];\n }\n\n // After the loop, a result is in prevRow because of the swap\n const distance = prevRow[shorterLength];\n\n return 1 - distance / Math.max(a.length, b.length);\n}\n"],"mappings":";AAoBA,IAAM,IAAwB;AAE9B,SAAgB,EAAW,GAAc,GAAsB;CAC7D,IAAI,EAAK,SAAS,KAAyB,EAAK,SAAS,GACvD,MAAU,WACR,6CAA6C,EAAsB,8CACrE;CAGF,IAAM,IAAI,EAAK,YAAY,GACrB,IAAI,EAAK,YAAY;CAE3B,IAAI,MAAM,GAAG,OAAO;CAEpB,IAAI,EAAE,WAAW,GAAG,OAAO,IAAE,WAAW;CAExC,IAAI,EAAE,WAAW,GAAG,OAAO;CAG3B,IAAM,CAAC,GAAS,KAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GACxD,IAAgB,EAAQ,QACxB,IAAe,EAAO,QAExB,IAAU,MAAM,KAAK,EAAE,QAAQ,IAAgB,EAAE,IAAI,GAAG,MAAM,CAAC,GAC/D,IAAc,MAAM,IAAgB,CAAC;CAEzC,KAAK,IAAI,IAAI,GAAG,KAAK,GAAc,KAAK;EACtC,EAAQ,KAAK;EACb,KAAK,IAAI,IAAI,GAAG,KAAK,GAAe,KAAK;GACvC,IAAM,IAAO,EAAO,IAAI,OAAO,EAAQ,IAAI,KAAK,IAAI;GAEpD,EAAQ,KAAK,KAAK,IAChB,EAAQ,IAAI,KAAK,GACjB,EAAQ,KAAK,GACb,EAAQ,IAAI,KAAK,CACnB;EACF;EAEA,CAAC,GAAS,KAAW,CAAC,GAAS,CAAO;CACxC;CAKA,OAAO,IAFU,EAAQ,KAEH,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM;AACnD"}
1
+ {"version":3,"file":"similarity.js","names":[],"sources":["../../src/string/similarity.ts"],"sourcesContent":["/**\n * Calculate the similarity between two strings using the Levenshtein distance algorithm.\n *\n * @example\n * ```ts\n * similarity('abc', 'abc') // 1\n * similarity('a', 'b') // 0\n * similarity('ab', 'ac') // 0.5\n * similarity('doe', 'John Doe') // 0.25\n * similarity('abc', 'axc') // 0.6666666666666667\n * similarity('kitten', 'sitting') // 0.5714285714285714\n * ```\n *\n * @param str1 - The first string.\n * @param str2 - The second string.\n *\n * @returns A number between 0 and 1 representing the similarity between the two strings.\n *\n * @throws {RangeError} If either input string exceeds 10 000 characters.\n */\nconst MAX_SIMILARITY_LENGTH = 10_000;\n\nexport function similarity(str1: string, str2: string): number {\n if (str1.length > MAX_SIMILARITY_LENGTH || str2.length > MAX_SIMILARITY_LENGTH) {\n throw new RangeError(\n `similarity: input strings must not exceed ${MAX_SIMILARITY_LENGTH} characters to prevent excessive memory usage`,\n );\n }\n\n const a = str1.toLowerCase();\n const b = str2.toLowerCase();\n\n if (a === b) return 1;\n\n if (a.length === 0) return b.length === 0 ? 1 : 0;\n\n if (b.length === 0) return 0;\n\n // Swap to ensure we use the smaller string for columns (O(min(A,B)) space)\n const [shorter, longer] = a.length < b.length ? [a, b] : [b, a];\n const shorterLength = shorter.length;\n const longerLength = longer.length;\n\n let prevRow = Array.from({ length: shorterLength + 1 }, (_, i) => i);\n let currRow = new Array(shorterLength + 1);\n\n for (let i = 1; i <= longerLength; i++) {\n currRow[0] = i;\n for (let j = 1; j <= shorterLength; j++) {\n const cost = longer[i - 1] === shorter[j - 1] ? 0 : 1;\n\n currRow[j] = Math.min(\n currRow[j - 1] + 1, // insertion\n prevRow[j] + 1, // deletion\n prevRow[j - 1] + cost, // substitution\n );\n }\n // Swap rows for the next iteration (avoid allocation)\n [prevRow, currRow] = [currRow, prevRow];\n }\n\n // After the loop, a result is in prevRow because of the swap\n const distance = prevRow[shorterLength];\n\n return 1 - distance / Math.max(a.length, b.length);\n}\n"],"mappings":"AAoBA,IAAM,EAAwB,IAE9B,SAAgB,WAAW,EAAc,EAAsB,CAC7D,GAAI,EAAK,OAAS,GAAyB,EAAK,OAAS,EACvD,MAAU,WACR,6CAA6C,EAAsB,8CACrE,EAGF,IAAM,EAAI,EAAK,YAAY,EACrB,EAAI,EAAK,YAAY,EAE3B,GAAI,IAAM,EAAG,MAAO,GAEpB,GAAI,EAAE,SAAW,EAAG,MAAO,IAAE,SAAW,GAExC,GAAI,EAAE,SAAW,EAAG,MAAO,GAG3B,GAAM,CAAC,EAAS,GAAU,EAAE,OAAS,EAAE,OAAS,CAAC,EAAG,CAAC,EAAI,CAAC,EAAG,CAAC,EACxD,EAAgB,EAAQ,OACxB,EAAe,EAAO,OAExB,EAAU,MAAM,KAAK,CAAE,OAAQ,EAAgB,CAAE,GAAI,EAAG,IAAM,CAAC,EAC/D,EAAc,MAAM,EAAgB,CAAC,EAEzC,IAAK,IAAI,EAAI,EAAG,GAAK,EAAc,IAAK,CACtC,EAAQ,GAAK,EACb,IAAK,IAAI,EAAI,EAAG,GAAK,EAAe,IAAK,CACvC,IAAM,EAAO,EAAO,EAAI,KAAO,EAAQ,EAAI,GAAK,EAAI,EAEpD,EAAQ,GAAK,KAAK,IAChB,EAAQ,EAAI,GAAK,EACjB,EAAQ,GAAK,EACb,EAAQ,EAAI,GAAK,CACnB,CACF,CAEA,CAAC,EAAS,GAAW,CAAC,EAAS,CAAO,CACxC,CAKA,MAAO,GAFU,EAAQ,GAEH,KAAK,IAAI,EAAE,OAAQ,EAAE,MAAM,CACnD"}
@@ -1,2 +1,2 @@
1
- const e=require("./_caseUtils.cjs");function t(t){return e.normalizeCase(t,`_`).toLowerCase()}exports.snakeCase=t;
1
+ const e=require("./_caseUtils.cjs");function snakeCase(t){return e.normalizeCase(t,`_`).toLowerCase()}exports.snakeCase=snakeCase;
2
2
  //# sourceMappingURL=snakeCase.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"snakeCase.cjs","names":[],"sources":["../../src/string/snakeCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to snake case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * snakeCase(text) // 'hello_world';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function snakeCase(str: string): string {\n return normalizeCase(str, '_').toLowerCase();\n}\n"],"mappings":"oCAeA,SAAgB,EAAU,EAAqB,CAC7C,OAAO,EAAA,cAAc,EAAK,GAAG,CAAC,CAAC,YAAY,CAC7C"}
1
+ {"version":3,"file":"snakeCase.cjs","names":[],"sources":["../../src/string/snakeCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to snake case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * snakeCase(text) // 'hello_world';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function snakeCase(str: string): string {\n return normalizeCase(str, '_').toLowerCase();\n}\n"],"mappings":"oCAeA,SAAgB,UAAU,EAAqB,CAC7C,OAAO,EAAA,cAAc,EAAK,GAAG,CAAC,CAAC,YAAY,CAC7C"}
@@ -1,9 +1,2 @@
1
- import { normalizeCase as e } from "./_caseUtils.js";
2
- //#region src/string/snakeCase.ts
3
- function t(t) {
4
- return e(t, "_").toLowerCase();
5
- }
6
- //#endregion
7
- export { t as snakeCase };
8
-
1
+ import{normalizeCase as e}from"./_caseUtils.js";function snakeCase(t){return e(t,`_`).toLowerCase()}export{snakeCase};
9
2
  //# sourceMappingURL=snakeCase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snakeCase.js","names":[],"sources":["../../src/string/snakeCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to snake case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * snakeCase(text) // 'hello_world';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function snakeCase(str: string): string {\n return normalizeCase(str, '_').toLowerCase();\n}\n"],"mappings":";;AAeA,SAAgB,EAAU,GAAqB;CAC7C,OAAO,EAAc,GAAK,GAAG,CAAC,CAAC,YAAY;AAC7C"}
1
+ {"version":3,"file":"snakeCase.js","names":[],"sources":["../../src/string/snakeCase.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Converts a string to snake case.\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * snakeCase(text) // 'hello_world';\n * ```\n *\n * @param str - The string to convert.\n *\n * @returns The converted string.\n */\nexport function snakeCase(str: string): string {\n return normalizeCase(str, '_').toLowerCase();\n}\n"],"mappings":"gDAeA,SAAgB,UAAU,EAAqB,CAC7C,OAAO,EAAc,EAAK,GAAG,CAAC,CAAC,YAAY,CAC7C"}
@@ -1,2 +1,2 @@
1
- const e=require("./words.cjs");function t(t){return e.words(t).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}exports.titleCase=t;
1
+ const e=require("./words.cjs");function titleCase(t){return e.words(t).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}exports.titleCase=titleCase;
2
2
  //# sourceMappingURL=titleCase.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"titleCase.cjs","names":[],"sources":["../../src/string/titleCase.ts"],"sourcesContent":["import { words } from './words';\n\n/**\n * Converts a string to title case.\n */\nexport function titleCase(str: string): string {\n return words(str)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n"],"mappings":"+BAKA,SAAgB,EAAU,EAAqB,CAC7C,OAAO,EAAA,MAAM,CAAG,CAAC,CACd,IAAK,GAAS,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,EAAI,EAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACzE,KAAK,GAAG,CACb"}
1
+ {"version":3,"file":"titleCase.cjs","names":[],"sources":["../../src/string/titleCase.ts"],"sourcesContent":["import { words } from './words';\n\n/**\n * Converts a string to title case.\n */\nexport function titleCase(str: string): string {\n return words(str)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n"],"mappings":"+BAKA,SAAgB,UAAU,EAAqB,CAC7C,OAAO,EAAA,MAAM,CAAG,CAAC,CACd,IAAK,GAAS,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,EAAI,EAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACzE,KAAK,GAAG,CACb"}
@@ -1,9 +1,2 @@
1
- import { words as e } from "./words.js";
2
- //#region src/string/titleCase.ts
3
- function t(t) {
4
- return e(t).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ");
5
- }
6
- //#endregion
7
- export { t as titleCase };
8
-
1
+ import{words as e}from"./words.js";function titleCase(t){return e(t).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}export{titleCase};
9
2
  //# sourceMappingURL=titleCase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"titleCase.js","names":[],"sources":["../../src/string/titleCase.ts"],"sourcesContent":["import { words } from './words';\n\n/**\n * Converts a string to title case.\n */\nexport function titleCase(str: string): string {\n return words(str)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n"],"mappings":";;AAKA,SAAgB,EAAU,GAAqB;CAC7C,OAAO,EAAM,CAAG,CAAC,CACd,KAAK,MAAS,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACzE,KAAK,GAAG;AACb"}
1
+ {"version":3,"file":"titleCase.js","names":[],"sources":["../../src/string/titleCase.ts"],"sourcesContent":["import { words } from './words';\n\n/**\n * Converts a string to title case.\n */\nexport function titleCase(str: string): string {\n return words(str)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n}\n"],"mappings":"mCAKA,SAAgB,UAAU,EAAqB,CAC7C,OAAO,EAAM,CAAG,CAAC,CACd,IAAK,GAAS,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,EAAI,EAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACzE,KAAK,GAAG,CACb"}
@@ -1,2 +1,2 @@
1
- function e(e,t=25,{completeWords:n=!1,ellipsis:r=`…`}={}){if(typeof e!=`string`)throw TypeError(`truncate: str must be a string`);if(typeof t!=`number`||!Number.isFinite(t)||t<0)throw RangeError(`truncate: limit must be a non-negative finite number`);if(e.length<=t)return e;let i=t;if(n){let n=e.substring(0,t).lastIndexOf(` `);n>0&&(i=n)}return`${e.substring(0,i).trim()}${r}`}exports.truncate=e;
1
+ function truncate(e,t=25,{completeWords:n=!1,ellipsis:r=`…`}={}){if(typeof e!=`string`)throw TypeError(`truncate: str must be a string`);if(typeof t!=`number`||!Number.isFinite(t)||t<0)throw RangeError(`truncate: limit must be a non-negative finite number`);if(e.length<=t)return e;let i=t;if(n){let n=e.substring(0,t).lastIndexOf(` `);n>0&&(i=n)}return`${e.substring(0,i).trim()}${r}`}exports.truncate=truncate;
2
2
  //# sourceMappingURL=truncate.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"truncate.cjs","names":[],"sources":["../../src/string/truncate.ts"],"sourcesContent":["export type TruncateOptions = {\n completeWords?: boolean;\n ellipsis?: string;\n};\n\n/**\n * Truncates a string if it is longer than the given maximum string length. The last characters of the truncated string are replaced with the ellipsis sign \"…\".\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * truncate(text, 5); // 'Hello…'\n * truncate(text, 8, { completeWords: true }); // 'Hello…'\n * truncate(text, 5, { ellipsis: '...' }); // 'Hello...'\n * ```\n *\n * @param str - The string to truncate.\n * @param limit - The maximum string length.\n * @param options - Options for truncation.\n * @param [options.completeWords] - If true, truncate to the nearest word boundary.\n * @param [options.ellipsis] - Suffix appended after truncation (default: '…').\n *\n * @returns The truncated string.\n *\n * @throws {TypeError} If str is not a string.\n * @throws {RangeError} If limit is not a non-negative finite number.\n */\nexport function truncate(\n str: string,\n limit = 25,\n { completeWords = false, ellipsis = '…' }: TruncateOptions = {},\n): string {\n if (typeof str !== 'string') {\n throw new TypeError('truncate: str must be a string');\n }\n\n if (typeof limit !== 'number' || !Number.isFinite(limit) || limit < 0) {\n throw new RangeError('truncate: limit must be a non-negative finite number');\n }\n\n if (str.length <= limit) {\n return str;\n }\n\n let end = limit;\n\n if (completeWords) {\n const wordEnd = str.substring(0, limit).lastIndexOf(' ');\n\n if (wordEnd > 0) end = wordEnd;\n }\n\n return `${str.substring(0, end).trim()}${ellipsis}`;\n}\n"],"mappings":"AA2BA,SAAgB,EACd,EACA,EAAQ,GACR,CAAE,gBAAgB,GAAO,WAAW,KAAyB,CAAC,EACtD,CACR,GAAI,OAAO,GAAQ,SACjB,MAAU,UAAU,gCAAgC,EAGtD,GAAI,OAAO,GAAU,UAAY,CAAC,OAAO,SAAS,CAAK,GAAK,EAAQ,EAClE,MAAU,WAAW,sDAAsD,EAG7E,GAAI,EAAI,QAAU,EAChB,OAAO,EAGT,IAAI,EAAM,EAEV,GAAI,EAAe,CACjB,IAAM,EAAU,EAAI,UAAU,EAAG,CAAK,CAAC,CAAC,YAAY,GAAG,EAEnD,EAAU,IAAG,EAAM,EACzB,CAEA,MAAO,GAAG,EAAI,UAAU,EAAG,CAAG,CAAC,CAAC,KAAK,IAAI,GAC3C"}
1
+ {"version":3,"file":"truncate.cjs","names":[],"sources":["../../src/string/truncate.ts"],"sourcesContent":["export type TruncateOptions = {\n completeWords?: boolean;\n ellipsis?: string;\n};\n\n/**\n * Truncates a string if it is longer than the given maximum string length. The last characters of the truncated string are replaced with the ellipsis sign \"…\".\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * truncate(text, 5); // 'Hello…'\n * truncate(text, 8, { completeWords: true }); // 'Hello…'\n * truncate(text, 5, { ellipsis: '...' }); // 'Hello...'\n * ```\n *\n * @param str - The string to truncate.\n * @param limit - The maximum string length.\n * @param options - Options for truncation.\n * @param [options.completeWords] - If true, truncate to the nearest word boundary.\n * @param [options.ellipsis] - Suffix appended after truncation (default: '…').\n *\n * @returns The truncated string.\n *\n * @throws {TypeError} If str is not a string.\n * @throws {RangeError} If limit is not a non-negative finite number.\n */\nexport function truncate(\n str: string,\n limit = 25,\n { completeWords = false, ellipsis = '…' }: TruncateOptions = {},\n): string {\n if (typeof str !== 'string') {\n throw new TypeError('truncate: str must be a string');\n }\n\n if (typeof limit !== 'number' || !Number.isFinite(limit) || limit < 0) {\n throw new RangeError('truncate: limit must be a non-negative finite number');\n }\n\n if (str.length <= limit) {\n return str;\n }\n\n let end = limit;\n\n if (completeWords) {\n const wordEnd = str.substring(0, limit).lastIndexOf(' ');\n\n if (wordEnd > 0) end = wordEnd;\n }\n\n return `${str.substring(0, end).trim()}${ellipsis}`;\n}\n"],"mappings":"AA2BA,SAAgB,SACd,EACA,EAAQ,GACR,CAAE,gBAAgB,GAAO,WAAW,KAAyB,CAAC,EACtD,CACR,GAAI,OAAO,GAAQ,SACjB,MAAU,UAAU,gCAAgC,EAGtD,GAAI,OAAO,GAAU,UAAY,CAAC,OAAO,SAAS,CAAK,GAAK,EAAQ,EAClE,MAAU,WAAW,sDAAsD,EAG7E,GAAI,EAAI,QAAU,EAChB,OAAO,EAGT,IAAI,EAAM,EAEV,GAAI,EAAe,CACjB,IAAM,EAAU,EAAI,UAAU,EAAG,CAAK,CAAC,CAAC,YAAY,GAAG,EAEnD,EAAU,IAAG,EAAM,EACzB,CAEA,MAAO,GAAG,EAAI,UAAU,EAAG,CAAG,CAAC,CAAC,KAAK,IAAI,GAC3C"}
@@ -1,16 +1,2 @@
1
- //#region src/string/truncate.ts
2
- function e(e, t = 25, { completeWords: n = !1, ellipsis: r = "…" } = {}) {
3
- if (typeof e != "string") throw TypeError("truncate: str must be a string");
4
- if (typeof t != "number" || !Number.isFinite(t) || t < 0) throw RangeError("truncate: limit must be a non-negative finite number");
5
- if (e.length <= t) return e;
6
- let i = t;
7
- if (n) {
8
- let n = e.substring(0, t).lastIndexOf(" ");
9
- n > 0 && (i = n);
10
- }
11
- return `${e.substring(0, i).trim()}${r}`;
12
- }
13
- //#endregion
14
- export { e as truncate };
15
-
1
+ function truncate(e,t=25,{completeWords:n=!1,ellipsis:r=`…`}={}){if(typeof e!=`string`)throw TypeError(`truncate: str must be a string`);if(typeof t!=`number`||!Number.isFinite(t)||t<0)throw RangeError(`truncate: limit must be a non-negative finite number`);if(e.length<=t)return e;let i=t;if(n){let n=e.substring(0,t).lastIndexOf(` `);n>0&&(i=n)}return`${e.substring(0,i).trim()}${r}`}export{truncate};
16
2
  //# sourceMappingURL=truncate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"truncate.js","names":[],"sources":["../../src/string/truncate.ts"],"sourcesContent":["export type TruncateOptions = {\n completeWords?: boolean;\n ellipsis?: string;\n};\n\n/**\n * Truncates a string if it is longer than the given maximum string length. The last characters of the truncated string are replaced with the ellipsis sign \"…\".\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * truncate(text, 5); // 'Hello…'\n * truncate(text, 8, { completeWords: true }); // 'Hello…'\n * truncate(text, 5, { ellipsis: '...' }); // 'Hello...'\n * ```\n *\n * @param str - The string to truncate.\n * @param limit - The maximum string length.\n * @param options - Options for truncation.\n * @param [options.completeWords] - If true, truncate to the nearest word boundary.\n * @param [options.ellipsis] - Suffix appended after truncation (default: '…').\n *\n * @returns The truncated string.\n *\n * @throws {TypeError} If str is not a string.\n * @throws {RangeError} If limit is not a non-negative finite number.\n */\nexport function truncate(\n str: string,\n limit = 25,\n { completeWords = false, ellipsis = '…' }: TruncateOptions = {},\n): string {\n if (typeof str !== 'string') {\n throw new TypeError('truncate: str must be a string');\n }\n\n if (typeof limit !== 'number' || !Number.isFinite(limit) || limit < 0) {\n throw new RangeError('truncate: limit must be a non-negative finite number');\n }\n\n if (str.length <= limit) {\n return str;\n }\n\n let end = limit;\n\n if (completeWords) {\n const wordEnd = str.substring(0, limit).lastIndexOf(' ');\n\n if (wordEnd > 0) end = wordEnd;\n }\n\n return `${str.substring(0, end).trim()}${ellipsis}`;\n}\n"],"mappings":";AA2BA,SAAgB,EACd,GACA,IAAQ,IACR,EAAE,mBAAgB,IAAO,cAAW,QAAyB,CAAC,GACtD;CACR,IAAI,OAAO,KAAQ,UACjB,MAAU,UAAU,gCAAgC;CAGtD,IAAI,OAAO,KAAU,YAAY,CAAC,OAAO,SAAS,CAAK,KAAK,IAAQ,GAClE,MAAU,WAAW,sDAAsD;CAG7E,IAAI,EAAI,UAAU,GAChB,OAAO;CAGT,IAAI,IAAM;CAEV,IAAI,GAAe;EACjB,IAAM,IAAU,EAAI,UAAU,GAAG,CAAK,CAAC,CAAC,YAAY,GAAG;EAEvD,AAAI,IAAU,MAAG,IAAM;CACzB;CAEA,OAAO,GAAG,EAAI,UAAU,GAAG,CAAG,CAAC,CAAC,KAAK,IAAI;AAC3C"}
1
+ {"version":3,"file":"truncate.js","names":[],"sources":["../../src/string/truncate.ts"],"sourcesContent":["export type TruncateOptions = {\n completeWords?: boolean;\n ellipsis?: string;\n};\n\n/**\n * Truncates a string if it is longer than the given maximum string length. The last characters of the truncated string are replaced with the ellipsis sign \"…\".\n *\n * @example\n * ```ts\n * const text = 'Hello World';\n * truncate(text, 5); // 'Hello…'\n * truncate(text, 8, { completeWords: true }); // 'Hello…'\n * truncate(text, 5, { ellipsis: '...' }); // 'Hello...'\n * ```\n *\n * @param str - The string to truncate.\n * @param limit - The maximum string length.\n * @param options - Options for truncation.\n * @param [options.completeWords] - If true, truncate to the nearest word boundary.\n * @param [options.ellipsis] - Suffix appended after truncation (default: '…').\n *\n * @returns The truncated string.\n *\n * @throws {TypeError} If str is not a string.\n * @throws {RangeError} If limit is not a non-negative finite number.\n */\nexport function truncate(\n str: string,\n limit = 25,\n { completeWords = false, ellipsis = '…' }: TruncateOptions = {},\n): string {\n if (typeof str !== 'string') {\n throw new TypeError('truncate: str must be a string');\n }\n\n if (typeof limit !== 'number' || !Number.isFinite(limit) || limit < 0) {\n throw new RangeError('truncate: limit must be a non-negative finite number');\n }\n\n if (str.length <= limit) {\n return str;\n }\n\n let end = limit;\n\n if (completeWords) {\n const wordEnd = str.substring(0, limit).lastIndexOf(' ');\n\n if (wordEnd > 0) end = wordEnd;\n }\n\n return `${str.substring(0, end).trim()}${ellipsis}`;\n}\n"],"mappings":"AA2BA,SAAgB,SACd,EACA,EAAQ,GACR,CAAE,gBAAgB,GAAO,WAAW,KAAyB,CAAC,EACtD,CACR,GAAI,OAAO,GAAQ,SACjB,MAAU,UAAU,gCAAgC,EAGtD,GAAI,OAAO,GAAU,UAAY,CAAC,OAAO,SAAS,CAAK,GAAK,EAAQ,EAClE,MAAU,WAAW,sDAAsD,EAG7E,GAAI,EAAI,QAAU,EAChB,OAAO,EAGT,IAAI,EAAM,EAEV,GAAI,EAAe,CACjB,IAAM,EAAU,EAAI,UAAU,EAAG,CAAK,CAAC,CAAC,YAAY,GAAG,EAEnD,EAAU,IAAG,EAAM,EACzB,CAEA,MAAO,GAAG,EAAI,UAAU,EAAG,CAAG,CAAC,CAAC,KAAK,IAAI,GAC3C"}
@@ -1,2 +1,2 @@
1
- var e={"&#39;":`'`,"&amp;":`&`,"&gt;":`>`,"&lt;":`<`,"&quot;":`"`};function t(t){return t.replace(/&(amp|lt|gt|quot|#39);/g,t=>e[t]??t)}exports.unescape=t;
1
+ var e={"&#39;":`'`,"&amp;":`&`,"&gt;":`>`,"&lt;":`<`,"&quot;":`"`};function unescape(t){return t.replace(/&(amp|lt|gt|quot|#39);/g,t=>e[t]??t)}exports.unescape=unescape;
2
2
  //# sourceMappingURL=unescape.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"unescape.cjs","names":[],"sources":["../../src/string/unescape.ts"],"sourcesContent":["const unescapeMap: Record<string, string> = {\n '&#39;': \"'\",\n '&amp;': '&',\n '&gt;': '>',\n '&lt;': '<',\n '&quot;': '\"',\n};\n\n/**\n * Unescapes HTML entities.\n */\nexport function unescape(value: string): string {\n return value.replace(/&(amp|lt|gt|quot|#39);/g, (entity) => unescapeMap[entity] ?? entity);\n}\n"],"mappings":"AAAA,IAAM,EAAsC,CAC1C,QAAS,IACT,QAAS,IACT,OAAQ,IACR,OAAQ,IACR,SAAU,GACZ,EAKA,SAAgB,EAAS,EAAuB,CAC9C,OAAO,EAAM,QAAQ,0BAA4B,GAAW,EAAY,IAAW,CAAM,CAC3F"}
1
+ {"version":3,"file":"unescape.cjs","names":[],"sources":["../../src/string/unescape.ts"],"sourcesContent":["const unescapeMap: Record<string, string> = {\n '&#39;': \"'\",\n '&amp;': '&',\n '&gt;': '>',\n '&lt;': '<',\n '&quot;': '\"',\n};\n\n/**\n * Unescapes HTML entities.\n */\nexport function unescape(value: string): string {\n return value.replace(/&(amp|lt|gt|quot|#39);/g, (entity) => unescapeMap[entity] ?? entity);\n}\n"],"mappings":"AAAA,IAAM,EAAsC,CAC1C,QAAS,IACT,QAAS,IACT,OAAQ,IACR,OAAQ,IACR,SAAU,GACZ,EAKA,SAAgB,SAAS,EAAuB,CAC9C,OAAO,EAAM,QAAQ,0BAA4B,GAAW,EAAY,IAAW,CAAM,CAC3F"}
@@ -1,15 +1,2 @@
1
- //#region src/string/unescape.ts
2
- var e = {
3
- "&#39;": "'",
4
- "&amp;": "&",
5
- "&gt;": ">",
6
- "&lt;": "<",
7
- "&quot;": "\""
8
- };
9
- function t(t) {
10
- return t.replace(/&(amp|lt|gt|quot|#39);/g, (t) => e[t] ?? t);
11
- }
12
- //#endregion
13
- export { t as unescape };
14
-
1
+ var e={"&#39;":`'`,"&amp;":`&`,"&gt;":`>`,"&lt;":`<`,"&quot;":`"`};function unescape(t){return t.replace(/&(amp|lt|gt|quot|#39);/g,t=>e[t]??t)}export{unescape};
15
2
  //# sourceMappingURL=unescape.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unescape.js","names":[],"sources":["../../src/string/unescape.ts"],"sourcesContent":["const unescapeMap: Record<string, string> = {\n '&#39;': \"'\",\n '&amp;': '&',\n '&gt;': '>',\n '&lt;': '<',\n '&quot;': '\"',\n};\n\n/**\n * Unescapes HTML entities.\n */\nexport function unescape(value: string): string {\n return value.replace(/&(amp|lt|gt|quot|#39);/g, (entity) => unescapeMap[entity] ?? entity);\n}\n"],"mappings":";AAAA,IAAM,IAAsC;CAC1C,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,UAAU;AACZ;AAKA,SAAgB,EAAS,GAAuB;CAC9C,OAAO,EAAM,QAAQ,4BAA4B,MAAW,EAAY,MAAW,CAAM;AAC3F"}
1
+ {"version":3,"file":"unescape.js","names":[],"sources":["../../src/string/unescape.ts"],"sourcesContent":["const unescapeMap: Record<string, string> = {\n '&#39;': \"'\",\n '&amp;': '&',\n '&gt;': '>',\n '&lt;': '<',\n '&quot;': '\"',\n};\n\n/**\n * Unescapes HTML entities.\n */\nexport function unescape(value: string): string {\n return value.replace(/&(amp|lt|gt|quot|#39);/g, (entity) => unescapeMap[entity] ?? entity);\n}\n"],"mappings":"AAAA,IAAM,EAAsC,CAC1C,QAAS,IACT,QAAS,IACT,OAAQ,IACR,OAAQ,IACR,SAAU,GACZ,EAKA,SAAgB,SAAS,EAAuB,CAC9C,OAAO,EAAM,QAAQ,0BAA4B,GAAW,EAAY,IAAW,CAAM,CAC3F"}
@@ -1,2 +1,2 @@
1
- const e=require("./_caseUtils.cjs");function t(t){let n=e.normalizeCase(t,` `);return n?n.split(` `).filter(Boolean):[]}exports.words=t;
1
+ const e=require("./_caseUtils.cjs");function words(t){let n=e.normalizeCase(t,` `);return n?n.split(` `).filter(Boolean):[]}exports.words=words;
2
2
  //# sourceMappingURL=words.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"words.cjs","names":[],"sources":["../../src/string/words.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Splits a string into normalized words.\n */\nexport function words(str: string): string[] {\n const normalized = normalizeCase(str, ' ');\n\n if (!normalized) return [];\n\n return normalized.split(' ').filter(Boolean);\n}\n"],"mappings":"oCAKA,SAAgB,EAAM,EAAuB,CAC3C,IAAM,EAAa,EAAA,cAAc,EAAK,GAAG,EAIzC,OAFK,EAEE,EAAW,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,EAFnB,CAAC,CAG3B"}
1
+ {"version":3,"file":"words.cjs","names":[],"sources":["../../src/string/words.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Splits a string into normalized words.\n */\nexport function words(str: string): string[] {\n const normalized = normalizeCase(str, ' ');\n\n if (!normalized) return [];\n\n return normalized.split(' ').filter(Boolean);\n}\n"],"mappings":"oCAKA,SAAgB,MAAM,EAAuB,CAC3C,IAAM,EAAa,EAAA,cAAc,EAAK,GAAG,EAIzC,OAFK,EAEE,EAAW,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,EAFnB,CAAC,CAG3B"}
@@ -1,10 +1,2 @@
1
- import { normalizeCase as e } from "./_caseUtils.js";
2
- //#region src/string/words.ts
3
- function t(t) {
4
- let n = e(t, " ");
5
- return n ? n.split(" ").filter(Boolean) : [];
6
- }
7
- //#endregion
8
- export { t as words };
9
-
1
+ import{normalizeCase as e}from"./_caseUtils.js";function words(t){let n=e(t,` `);return n?n.split(` `).filter(Boolean):[]}export{words};
10
2
  //# sourceMappingURL=words.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"words.js","names":[],"sources":["../../src/string/words.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Splits a string into normalized words.\n */\nexport function words(str: string): string[] {\n const normalized = normalizeCase(str, ' ');\n\n if (!normalized) return [];\n\n return normalized.split(' ').filter(Boolean);\n}\n"],"mappings":";;AAKA,SAAgB,EAAM,GAAuB;CAC3C,IAAM,IAAa,EAAc,GAAK,GAAG;CAIzC,OAFK,IAEE,EAAW,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,IAFnB,CAAC;AAG3B"}
1
+ {"version":3,"file":"words.js","names":[],"sources":["../../src/string/words.ts"],"sourcesContent":["import { normalizeCase } from './_caseUtils';\n\n/**\n * Splits a string into normalized words.\n */\nexport function words(str: string): string[] {\n const normalized = normalizeCase(str, ' ');\n\n if (!normalized) return [];\n\n return normalized.split(' ').filter(Boolean);\n}\n"],"mappings":"gDAKA,SAAgB,MAAM,EAAuB,CAC3C,IAAM,EAAa,EAAc,EAAK,GAAG,EAIzC,OAFK,EAEE,EAAW,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,EAFnB,CAAC,CAG3B"}
package/dist/types.d.ts CHANGED
@@ -1,5 +1,15 @@
1
1
  /** A function that tears down a subscription or listener registration. */
2
2
  export type Unsubscribe = () => void;
3
+ /**
4
+ * Canonical read-only observable contract: `getSnapshot()` reads current state,
5
+ * `subscribe()` registers a change listener and returns an unsubscribe function.
6
+ * Structural by design — implementations live in other packages (ripple,
7
+ * sentinel, wayfinder, ledger) without depending on arsenal at runtime.
8
+ */
9
+ export interface Subscribable<T> {
10
+ getSnapshot(): T;
11
+ subscribe(listener: () => void): Unsubscribe;
12
+ }
3
13
  export type Fn<Args extends unknown[] = never[], Result = unknown> = (...args: Args) => Result;
4
14
  export type Obj = Record<string, unknown>;
5
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAErC,MAAM,MAAM,EAAE,CAAC,IAAI,SAAS,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,MAAM,GAAG,OAAO,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;AAE/F,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;AAEjD,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAErC;;;;;GAKG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,WAAW,IAAI,CAAC,CAAC;IACjB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;CAC9C;AAED,MAAM,MAAM,EAAE,CAAC,IAAI,SAAS,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,MAAM,GAAG,OAAO,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;AAE/F,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;AAEjD,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vielzeug/arsenal",
3
- "version": "3.0.0",
4
- "description": "Tree-shakeable TypeScript utility library — array, object, string, async, cache, math, and more",
3
+ "version": "26.10.0",
4
+ "description": "Non-trivial TypeScript utilities — retry, cancellation, cache, safe-path, serialization, prototype-pollution-guarded collections",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/helmuthdu/vielzeug",
@@ -38,6 +38,11 @@
38
38
  "import": "./dist/cache/index.js",
39
39
  "require": "./dist/cache/index.cjs"
40
40
  },
41
+ "./encoding": {
42
+ "types": "./dist/encoding/index.d.ts",
43
+ "import": "./dist/encoding/index.js",
44
+ "require": "./dist/encoding/index.cjs"
45
+ },
41
46
  "./function": {
42
47
  "types": "./dist/function/index.d.ts",
43
48
  "import": "./dist/function/index.js",
@@ -80,6 +85,9 @@
80
85
  "cache": [
81
86
  "dist/cache/index.d.ts"
82
87
  ],
88
+ "encoding": [
89
+ "dist/encoding/index.d.ts"
90
+ ],
83
91
  "function": [
84
92
  "dist/function/index.d.ts"
85
93
  ],
@@ -118,9 +126,9 @@
118
126
  "verify:exports": "node ./scripts/sync-exports.mjs --check"
119
127
  },
120
128
  "devDependencies": {
121
- "@types/node": "^26.4.1",
129
+ "@types/node": "^26.6.2",
122
130
  "typescript": "^6.0.3",
123
- "vite": "^8.2.2",
124
- "vitest": "^5.0.0"
131
+ "vite": "^8.3.0",
132
+ "vitest": "^5.0.1"
125
133
  }
126
134
  }