@flickfyi/flkr 0.0.141 → 0.0.153

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 (494) hide show
  1. package/node_modules/@flickfyi/attestation/.turbo/turbo-build.log +7 -7
  2. package/node_modules/@flickfyi/biscuit/.turbo/turbo-build.log +7 -7
  3. package/node_modules/@flickfyi/core/.oxlintrc.json +2 -1
  4. package/node_modules/@flickfyi/core/.turbo/turbo-build.log +499 -92
  5. package/node_modules/@flickfyi/core/README.md +58 -4
  6. package/node_modules/@flickfyi/core/dist/index.cjs +1 -1
  7. package/node_modules/@flickfyi/core/dist/index.js +35 -24
  8. package/node_modules/@flickfyi/core/dist/kowalski/calculations.d.ts +17 -0
  9. package/node_modules/@flickfyi/core/dist/kowalski/calculator.d.ts +13 -0
  10. package/node_modules/@flickfyi/core/dist/kowalski/catalog.cjs +1 -0
  11. package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.cts +962 -0
  12. package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.ts +962 -0
  13. package/node_modules/@flickfyi/core/dist/kowalski/catalog.js +639 -0
  14. package/node_modules/@flickfyi/core/dist/kowalski/clocks.d.ts +4 -0
  15. package/node_modules/@flickfyi/core/dist/kowalski/date-time.d.ts +22 -0
  16. package/node_modules/@flickfyi/core/dist/kowalski/details.d.ts +7 -0
  17. package/node_modules/@flickfyi/core/dist/kowalski/everyday.d.ts +8 -0
  18. package/node_modules/@flickfyi/core/dist/kowalski/format.d.ts +4 -0
  19. package/node_modules/@flickfyi/core/dist/kowalski/frame.d.ts +161 -0
  20. package/node_modules/@flickfyi/core/dist/kowalski/index.cjs +21 -0
  21. package/node_modules/@flickfyi/core/dist/kowalski/index.d.cts +8 -0
  22. package/node_modules/@flickfyi/core/dist/kowalski/index.d.ts +8 -0
  23. package/node_modules/@flickfyi/core/dist/kowalski/index.js +7496 -0
  24. package/node_modules/@flickfyi/core/dist/kowalski/productivity.d.ts +5 -0
  25. package/node_modules/@flickfyi/core/dist/kowalski/recipe.d.ts +8 -0
  26. package/node_modules/@flickfyi/core/dist/kowalski/tools.d.ts +7 -0
  27. package/node_modules/@flickfyi/core/dist/kowalski/use-clock.d.ts +6 -0
  28. package/node_modules/@flickfyi/core/dist/kowalski/use-configured-feature.d.ts +19 -0
  29. package/node_modules/@flickfyi/core/dist/kowalski/use-feature-store.d.ts +15 -0
  30. package/node_modules/@flickfyi/core/dist/kowalski.css +506 -0
  31. package/node_modules/@flickfyi/core/dist/molecules/field/field.d.ts +8 -0
  32. package/node_modules/@flickfyi/core/dist/molecules/index.cjs +1 -1
  33. package/node_modules/@flickfyi/core/dist/molecules/index.d.cts +3 -0
  34. package/node_modules/@flickfyi/core/dist/molecules/index.d.ts +3 -0
  35. package/node_modules/@flickfyi/core/dist/molecules/index.js +88 -27
  36. package/node_modules/@flickfyi/core/dist/molecules/segmented/segmented.d.ts +10 -0
  37. package/node_modules/@flickfyi/core/dist/molecules/stepper/stepper.d.ts +10 -0
  38. package/node_modules/@flickfyi/core/dist/quantum/use-store.d.ts +7 -1
  39. package/node_modules/@flickfyi/core/dist/themes.css +2 -0
  40. package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.stories.tsx +15 -0
  41. package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.tsx +17 -0
  42. package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.stories.tsx +15 -0
  43. package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.tsx +23 -0
  44. package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.stories.tsx +15 -0
  45. package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.tsx +26 -0
  46. package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.stories.tsx +15 -0
  47. package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.tsx +24 -0
  48. package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.stories.tsx +15 -0
  49. package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.tsx +26 -0
  50. package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.stories.tsx +15 -0
  51. package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.tsx +22 -0
  52. package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.stories.tsx +15 -0
  53. package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.tsx +23 -0
  54. package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.stories.tsx +15 -0
  55. package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.tsx +23 -0
  56. package/node_modules/@flickfyi/core/examples/kowalski/event/event.stories.tsx +15 -0
  57. package/node_modules/@flickfyi/core/examples/kowalski/event/event.tsx +24 -0
  58. package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.stories.tsx +15 -0
  59. package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.tsx +23 -0
  60. package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.stories.tsx +15 -0
  61. package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.tsx +24 -0
  62. package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.stories.tsx +15 -0
  63. package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.tsx +23 -0
  64. package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.stories.tsx +15 -0
  65. package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.tsx +25 -0
  66. package/node_modules/@flickfyi/core/examples/kowalski/note/note.stories.tsx +15 -0
  67. package/node_modules/@flickfyi/core/examples/kowalski/note/note.tsx +22 -0
  68. package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.stories.tsx +15 -0
  69. package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.tsx +26 -0
  70. package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.stories.tsx +15 -0
  71. package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.tsx +23 -0
  72. package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.stories.tsx +15 -0
  73. package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.tsx +19 -0
  74. package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.stories.tsx +15 -0
  75. package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.tsx +120 -0
  76. package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.stories.tsx +15 -0
  77. package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.tsx +23 -0
  78. package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.stories.tsx +15 -0
  79. package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.tsx +27 -0
  80. package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.stories.tsx +15 -0
  81. package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.tsx +26 -0
  82. package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.stories.tsx +15 -0
  83. package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.tsx +27 -0
  84. package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.stories.tsx +15 -0
  85. package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.tsx +27 -0
  86. package/node_modules/@flickfyi/core/examples/kowalski/theme.ts +3 -0
  87. package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.stories.tsx +15 -0
  88. package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.tsx +22 -0
  89. package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.stories.tsx +15 -0
  90. package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.tsx +23 -0
  91. package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.stories.tsx +15 -0
  92. package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.tsx +26 -0
  93. package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.stories.tsx +15 -0
  94. package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.tsx +24 -0
  95. package/node_modules/@flickfyi/core/examples/parrott/calculator/calculator.stories.tsx +3 -1
  96. package/node_modules/@flickfyi/core/examples/parrott/checklist/checklist.stories.tsx +3 -1
  97. package/node_modules/@flickfyi/core/examples/parrott/countdown/countdown.stories.tsx +3 -1
  98. package/node_modules/@flickfyi/core/examples/parrott/counter/counter.stories.tsx +1 -0
  99. package/node_modules/@flickfyi/core/examples/parrott/fortune/fortune.stories.tsx +3 -1
  100. package/node_modules/@flickfyi/core/examples/parrott/grid/grid.stories.tsx +3 -1
  101. package/node_modules/@flickfyi/core/examples/parrott/kale-smoothie/kale-smoothie.stories.tsx +1 -0
  102. package/node_modules/@flickfyi/core/examples/parrott/list/list.stories.tsx +3 -1
  103. package/node_modules/@flickfyi/core/examples/parrott/log/log.stories.tsx +3 -1
  104. package/node_modules/@flickfyi/core/examples/parrott/timed-task/timed-task.stories.tsx +3 -1
  105. package/node_modules/@flickfyi/core/examples/parrott/timer/timer.stories.tsx +3 -1
  106. package/node_modules/@flickfyi/core/fixtures/native/host/project.yml +3 -0
  107. package/node_modules/@flickfyi/core/fixtures/native/src/catalog-features.tsx +88 -0
  108. package/node_modules/@flickfyi/core/package.json +35 -5
  109. package/node_modules/@flickfyi/core/package.tsgo.json +19 -1
  110. package/node_modules/@flickfyi/core/scripts/vite-globals.d.ts +2 -0
  111. package/node_modules/@flickfyi/core/src/generated-types.d.ts +1 -0
  112. package/node_modules/@flickfyi/core/src/kowalski/README.md +9 -0
  113. package/node_modules/@flickfyi/core/src/kowalski/calculations.ts +106 -0
  114. package/node_modules/@flickfyi/core/src/kowalski/calculator.ts +243 -0
  115. package/node_modules/@flickfyi/core/src/kowalski/catalog.ts +787 -0
  116. package/node_modules/@flickfyi/core/src/kowalski/clocks.tsx +464 -0
  117. package/node_modules/@flickfyi/core/src/kowalski/date-time.tsx +469 -0
  118. package/node_modules/@flickfyi/core/src/kowalski/details.tsx +1387 -0
  119. package/node_modules/@flickfyi/core/src/kowalski/everyday.tsx +652 -0
  120. package/node_modules/@flickfyi/core/src/kowalski/format.ts +48 -0
  121. package/node_modules/@flickfyi/core/src/kowalski/frame.tsx +351 -0
  122. package/node_modules/@flickfyi/core/src/kowalski/index.ts +23 -0
  123. package/node_modules/@flickfyi/core/src/kowalski/productivity.tsx +575 -0
  124. package/node_modules/@flickfyi/core/src/kowalski/recipe.tsx +555 -0
  125. package/node_modules/@flickfyi/core/src/kowalski/stories/composition.stories.tsx +47 -0
  126. package/node_modules/@flickfyi/core/src/kowalski/stories/composition.tsx +100 -0
  127. package/node_modules/@flickfyi/core/src/kowalski/tools.tsx +1213 -0
  128. package/node_modules/@flickfyi/core/src/kowalski/use-clock.ts +19 -0
  129. package/node_modules/@flickfyi/core/src/kowalski/use-configured-feature.ts +85 -0
  130. package/node_modules/@flickfyi/core/src/kowalski/use-feature-store.ts +119 -0
  131. package/node_modules/@flickfyi/core/src/molecules/field/field.tsx +34 -0
  132. package/node_modules/@flickfyi/core/src/molecules/index.ts +3 -0
  133. package/node_modules/@flickfyi/core/src/molecules/segmented/segmented.tsx +48 -0
  134. package/node_modules/@flickfyi/core/src/molecules/stepper/stepper.tsx +54 -0
  135. package/node_modules/@flickfyi/core/src/quantum/use-store.ts +41 -16
  136. package/node_modules/@flickfyi/core/tests/fly.test.ts +34 -7
  137. package/node_modules/@flickfyi/core/tests/kowalski-calculations.test.ts +60 -0
  138. package/node_modules/@flickfyi/core/tests/kowalski-calculator.test.ts +142 -0
  139. package/node_modules/@flickfyi/core/tests/kowalski-contracts.test.ts +223 -0
  140. package/node_modules/@flickfyi/core/tests/kowalski-date-time.test.tsx +462 -0
  141. package/node_modules/@flickfyi/core/tests/kowalski-features.test.tsx +2158 -0
  142. package/node_modules/@flickfyi/core/tests/kowalski-store.test.tsx +514 -0
  143. package/node_modules/@flickfyi/core/tests/preview-build.test.ts +1 -1
  144. package/node_modules/@flickfyi/core/tests/quantum-use-store.test.ts +53 -1
  145. package/node_modules/@flickfyi/core/tests/verify-tsgo-assets.test.ts +1 -1
  146. package/node_modules/@flickfyi/core/tsconfig.vite-dts.json +2 -1
  147. package/node_modules/@flickfyi/core/tsgo.bun.lock +111 -9
  148. package/node_modules/@flickfyi/core/tsgo.package.json +21 -3
  149. package/node_modules/@flickfyi/core/vite.config.ts +9 -5
  150. package/node_modules/@flickfyi/core/vitest.config.ts +1 -1
  151. package/node_modules/@flickfyi/http-message-sig/.turbo/turbo-build.log +7 -7
  152. package/node_modules/@flickfyi/identity/.turbo/turbo-build.log +8 -9
  153. package/node_modules/@flickfyi/lens/.turbo/turbo-build.log +7 -7
  154. package/node_modules/@flickfyi/photon/.turbo/turbo-build.log +4 -4
  155. package/node_modules/@flickfyi/photon/Sources/Photon/Components/Button.swift +29 -2
  156. package/node_modules/@flickfyi/photon/Sources/PhotonVersion/Resources/photon-version.json +1 -1
  157. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Components/ButtonHostTests.swift +26 -0
  158. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-features.styles.json +1 -0
  159. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-native.styles.json +1 -1
  160. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-scale.styles.json +1 -1
  161. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-theme.styles.json +1 -1
  162. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-typography.styles.json +1 -1
  163. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/stylex-calculator.styles.json +1 -1
  164. package/node_modules/@flickfyi/photon/dist/globals.d.ts +5 -0
  165. package/node_modules/@flickfyi/photon/dist/version.cjs +1 -1
  166. package/node_modules/@flickfyi/photon/dist/version.js +1 -1
  167. package/node_modules/@flickfyi/photon/generated/react-swiftui.d.ts +1 -0
  168. package/node_modules/@flickfyi/photon/package.json +1 -1
  169. package/node_modules/@flickfyi/photon/src/globals.d.ts +5 -0
  170. package/node_modules/@flickfyi/rwsdk-extensions/.turbo/turbo-build.log +7 -7
  171. package/node_modules/@formatjs/fast-memoize/LICENSE.md +9 -0
  172. package/node_modules/@formatjs/fast-memoize/README.md +3 -0
  173. package/node_modules/@formatjs/fast-memoize/index.d.ts +35 -0
  174. package/node_modules/@formatjs/fast-memoize/index.js +69 -0
  175. package/node_modules/@formatjs/fast-memoize/index.js.map +1 -0
  176. package/node_modules/@formatjs/fast-memoize/package.json +25 -0
  177. package/node_modules/@formatjs/icu-messageformat-parser/LICENSE.md +9 -0
  178. package/node_modules/@formatjs/icu-messageformat-parser/README.md +38 -0
  179. package/node_modules/@formatjs/icu-messageformat-parser/index.d.ts +393 -0
  180. package/node_modules/@formatjs/icu-messageformat-parser/index.js +2187 -0
  181. package/node_modules/@formatjs/icu-messageformat-parser/index.js.map +1 -0
  182. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.d.ts +175 -0
  183. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
  184. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js.map +1 -0
  185. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.d.ts +183 -0
  186. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
  187. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js.map +1 -0
  188. package/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
  189. package/node_modules/@formatjs/icu-messageformat-parser/printer.d.ts +154 -0
  190. package/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
  191. package/node_modules/@formatjs/icu-messageformat-parser/printer.js.map +1 -0
  192. package/node_modules/@formatjs/icu-skeleton-parser/LICENSE.md +9 -0
  193. package/node_modules/@formatjs/icu-skeleton-parser/README.md +1 -0
  194. package/node_modules/@formatjs/icu-skeleton-parser/index.d.ts +67 -0
  195. package/node_modules/@formatjs/icu-skeleton-parser/index.js +380 -0
  196. package/node_modules/@formatjs/icu-skeleton-parser/index.js.map +1 -0
  197. package/node_modules/@formatjs/icu-skeleton-parser/package.json +15 -0
  198. package/node_modules/@formatjs/intl/LICENSE.md +9 -0
  199. package/node_modules/@formatjs/intl/README.md +3 -0
  200. package/node_modules/@formatjs/intl/index.d.ts +499 -0
  201. package/node_modules/@formatjs/intl/index.js +595 -0
  202. package/node_modules/@formatjs/intl/index.js.map +1 -0
  203. package/node_modules/@formatjs/intl/package.json +37 -0
  204. package/node_modules/decimal.js/LICENCE.md +23 -0
  205. package/node_modules/decimal.js/README.md +246 -0
  206. package/node_modules/decimal.js/decimal.d.ts +301 -0
  207. package/node_modules/decimal.js/decimal.js +4951 -0
  208. package/node_modules/decimal.js/decimal.mjs +4914 -0
  209. package/node_modules/decimal.js/package.json +55 -0
  210. package/node_modules/format-quantity/LICENSE +21 -0
  211. package/node_modules/format-quantity/README.md +181 -0
  212. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.d.ts +131 -0
  213. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js +214 -0
  214. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js.map +1 -0
  215. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.d.ts +131 -0
  216. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js +2 -0
  217. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js.map +1 -0
  218. package/node_modules/format-quantity/dist/cjs/index.d.ts +1 -0
  219. package/node_modules/format-quantity/dist/cjs/index.js +6 -0
  220. package/node_modules/format-quantity/dist/format-quantity.d.mts +131 -0
  221. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.d.ts +131 -0
  222. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js +268 -0
  223. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js.map +1 -0
  224. package/node_modules/format-quantity/dist/format-quantity.mjs +208 -0
  225. package/node_modules/format-quantity/dist/format-quantity.mjs.map +1 -0
  226. package/node_modules/format-quantity/dist/format-quantity.production.d.mts +131 -0
  227. package/node_modules/format-quantity/dist/format-quantity.production.mjs +2 -0
  228. package/node_modules/format-quantity/dist/format-quantity.production.mjs.map +1 -0
  229. package/node_modules/format-quantity/dist/format-quantity.umd.min.js +3 -0
  230. package/node_modules/format-quantity/dist/format-quantity.umd.min.js.map +1 -0
  231. package/node_modules/format-quantity/package.json +81 -0
  232. package/node_modules/intl-messageformat/LICENSE.md +33 -0
  233. package/node_modules/intl-messageformat/README.md +3 -0
  234. package/node_modules/intl-messageformat/index.d.ts +177 -0
  235. package/node_modules/intl-messageformat/index.js +327 -0
  236. package/node_modules/intl-messageformat/index.js.map +1 -0
  237. package/node_modules/intl-messageformat/intl-messageformat.iife.js +2819 -0
  238. package/node_modules/intl-messageformat/package.json +40 -0
  239. package/node_modules/numeric-quantity/LICENSE +21 -0
  240. package/node_modules/numeric-quantity/README.md +306 -0
  241. package/node_modules/numeric-quantity/dist/cjs/index.d.ts +1 -0
  242. package/node_modules/numeric-quantity/dist/cjs/index.js +6 -0
  243. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.d.ts +293 -0
  244. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js +579 -0
  245. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js.map +1 -0
  246. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.d.ts +293 -0
  247. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js +2 -0
  248. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js.map +1 -0
  249. package/node_modules/numeric-quantity/dist/numeric-quantity.d.mts +293 -0
  250. package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js +2 -0
  251. package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js.map +1 -0
  252. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.d.ts +293 -0
  253. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js +622 -0
  254. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js.map +1 -0
  255. package/node_modules/numeric-quantity/dist/numeric-quantity.mjs +564 -0
  256. package/node_modules/numeric-quantity/dist/numeric-quantity.mjs.map +1 -0
  257. package/node_modules/numeric-quantity/dist/numeric-quantity.production.d.mts +293 -0
  258. package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs +2 -0
  259. package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs.map +1 -0
  260. package/node_modules/numeric-quantity/package.json +72 -0
  261. package/node_modules/validator/LICENSE +20 -0
  262. package/node_modules/validator/README.md +269 -0
  263. package/node_modules/validator/es/index.js +218 -0
  264. package/node_modules/validator/es/lib/alpha.js +151 -0
  265. package/node_modules/validator/es/lib/blacklist.js +5 -0
  266. package/node_modules/validator/es/lib/contains.js +15 -0
  267. package/node_modules/validator/es/lib/equals.js +5 -0
  268. package/node_modules/validator/es/lib/escape.js +5 -0
  269. package/node_modules/validator/es/lib/isAbaRouting.js +15 -0
  270. package/node_modules/validator/es/lib/isAfter.js +10 -0
  271. package/node_modules/validator/es/lib/isAlpha.js +23 -0
  272. package/node_modules/validator/es/lib/isAlphanumeric.js +23 -0
  273. package/node_modules/validator/es/lib/isAscii.js +10 -0
  274. package/node_modules/validator/es/lib/isBIC.js +16 -0
  275. package/node_modules/validator/es/lib/isBase32.js +15 -0
  276. package/node_modules/validator/es/lib/isBase58.js +8 -0
  277. package/node_modules/validator/es/lib/isBase64.js +23 -0
  278. package/node_modules/validator/es/lib/isBefore.js +10 -0
  279. package/node_modules/validator/es/lib/isBoolean.js +15 -0
  280. package/node_modules/validator/es/lib/isBtcAddress.js +7 -0
  281. package/node_modules/validator/es/lib/isByteLength.js +19 -0
  282. package/node_modules/validator/es/lib/isCreditCard.js +43 -0
  283. package/node_modules/validator/es/lib/isCurrency.js +74 -0
  284. package/node_modules/validator/es/lib/isDataURI.js +31 -0
  285. package/node_modules/validator/es/lib/isDate.js +93 -0
  286. package/node_modules/validator/es/lib/isDecimal.js +22 -0
  287. package/node_modules/validator/es/lib/isDivisibleBy.js +6 -0
  288. package/node_modules/validator/es/lib/isEAN.js +70 -0
  289. package/node_modules/validator/es/lib/isEmail.js +165 -0
  290. package/node_modules/validator/es/lib/isEmpty.js +10 -0
  291. package/node_modules/validator/es/lib/isEthereumAddress.js +6 -0
  292. package/node_modules/validator/es/lib/isFQDN.js +67 -0
  293. package/node_modules/validator/es/lib/isFloat.js +14 -0
  294. package/node_modules/validator/es/lib/isFullWidth.js +6 -0
  295. package/node_modules/validator/es/lib/isHSL.js +13 -0
  296. package/node_modules/validator/es/lib/isHalfWidth.js +6 -0
  297. package/node_modules/validator/es/lib/isHash.js +21 -0
  298. package/node_modules/validator/es/lib/isHexColor.js +13 -0
  299. package/node_modules/validator/es/lib/isHexadecimal.js +6 -0
  300. package/node_modules/validator/es/lib/isIBAN.js +171 -0
  301. package/node_modules/validator/es/lib/isIMEI.js +40 -0
  302. package/node_modules/validator/es/lib/isIP.js +58 -0
  303. package/node_modules/validator/es/lib/isIPRange.js +41 -0
  304. package/node_modules/validator/es/lib/isISBN.js +47 -0
  305. package/node_modules/validator/es/lib/isISIN.js +55 -0
  306. package/node_modules/validator/es/lib/isISO15924.js +9 -0
  307. package/node_modules/validator/es/lib/isISO31661Alpha2.js +21 -0
  308. package/node_modules/validator/es/lib/isISO31661Alpha3.js +20 -0
  309. package/node_modules/validator/es/lib/isISO31661Numeric.js +8 -0
  310. package/node_modules/validator/es/lib/isISO4217.js +9 -0
  311. package/node_modules/validator/es/lib/isISO6346.js +28 -0
  312. package/node_modules/validator/es/lib/isISO6391.js +6 -0
  313. package/node_modules/validator/es/lib/isISO8601.js +42 -0
  314. package/node_modules/validator/es/lib/isISRC.js +8 -0
  315. package/node_modules/validator/es/lib/isISSN.js +19 -0
  316. package/node_modules/validator/es/lib/isIdentityCard.js +407 -0
  317. package/node_modules/validator/es/lib/isIn.js +23 -0
  318. package/node_modules/validator/es/lib/isInt.js +19 -0
  319. package/node_modules/validator/es/lib/isJSON.js +26 -0
  320. package/node_modules/validator/es/lib/isJWT.js +15 -0
  321. package/node_modules/validator/es/lib/isLatLong.js +21 -0
  322. package/node_modules/validator/es/lib/isLength.js +27 -0
  323. package/node_modules/validator/es/lib/isLicensePlate.js +58 -0
  324. package/node_modules/validator/es/lib/isLocale.js +107 -0
  325. package/node_modules/validator/es/lib/isLowercase.js +5 -0
  326. package/node_modules/validator/es/lib/isLuhnNumber.js +25 -0
  327. package/node_modules/validator/es/lib/isMACAddress.js +36 -0
  328. package/node_modules/validator/es/lib/isMD5.js +6 -0
  329. package/node_modules/validator/es/lib/isMagnetURI.js +9 -0
  330. package/node_modules/validator/es/lib/isMailtoURI.js +75 -0
  331. package/node_modules/validator/es/lib/isMimeType.js +40 -0
  332. package/node_modules/validator/es/lib/isMobilePhone.js +212 -0
  333. package/node_modules/validator/es/lib/isMongoId.js +6 -0
  334. package/node_modules/validator/es/lib/isMultibyte.js +10 -0
  335. package/node_modules/validator/es/lib/isNumeric.js +10 -0
  336. package/node_modules/validator/es/lib/isOctal.js +6 -0
  337. package/node_modules/validator/es/lib/isPassportNumber.js +145 -0
  338. package/node_modules/validator/es/lib/isPort.js +8 -0
  339. package/node_modules/validator/es/lib/isPostalCode.js +100 -0
  340. package/node_modules/validator/es/lib/isRFC3339.js +21 -0
  341. package/node_modules/validator/es/lib/isRgbColor.js +34 -0
  342. package/node_modules/validator/es/lib/isSemVer.js +14 -0
  343. package/node_modules/validator/es/lib/isSlug.js +6 -0
  344. package/node_modules/validator/es/lib/isStrongPassword.js +90 -0
  345. package/node_modules/validator/es/lib/isSurrogatePair.js +6 -0
  346. package/node_modules/validator/es/lib/isTaxID.js +1407 -0
  347. package/node_modules/validator/es/lib/isTime.js +22 -0
  348. package/node_modules/validator/es/lib/isULID.js +5 -0
  349. package/node_modules/validator/es/lib/isURL.js +241 -0
  350. package/node_modules/validator/es/lib/isUUID.js +23 -0
  351. package/node_modules/validator/es/lib/isUppercase.js +5 -0
  352. package/node_modules/validator/es/lib/isVAT.js +264 -0
  353. package/node_modules/validator/es/lib/isVariableWidth.js +7 -0
  354. package/node_modules/validator/es/lib/isWhitelisted.js +10 -0
  355. package/node_modules/validator/es/lib/ltrim.js +7 -0
  356. package/node_modules/validator/es/lib/matches.js +8 -0
  357. package/node_modules/validator/es/lib/normalizeEmail.js +131 -0
  358. package/node_modules/validator/es/lib/rtrim.js +15 -0
  359. package/node_modules/validator/es/lib/stripLow.js +7 -0
  360. package/node_modules/validator/es/lib/toBoolean.js +8 -0
  361. package/node_modules/validator/es/lib/toDate.js +6 -0
  362. package/node_modules/validator/es/lib/toFloat.js +5 -0
  363. package/node_modules/validator/es/lib/toInt.js +5 -0
  364. package/node_modules/validator/es/lib/trim.js +5 -0
  365. package/node_modules/validator/es/lib/unescape.js +8 -0
  366. package/node_modules/validator/es/lib/util/algorithms.js +79 -0
  367. package/node_modules/validator/es/lib/util/assertString.js +4 -0
  368. package/node_modules/validator/es/lib/util/checkHost.js +12 -0
  369. package/node_modules/validator/es/lib/util/includesArray.js +6 -0
  370. package/node_modules/validator/es/lib/util/includesString.js +4 -0
  371. package/node_modules/validator/es/lib/util/merge.js +14 -0
  372. package/node_modules/validator/es/lib/util/multilineRegex.js +12 -0
  373. package/node_modules/validator/es/lib/util/nullUndefinedCheck.js +3 -0
  374. package/node_modules/validator/es/lib/util/toString.js +13 -0
  375. package/node_modules/validator/es/lib/util/typeOf.js +10 -0
  376. package/node_modules/validator/es/lib/whitelist.js +5 -0
  377. package/node_modules/validator/index.js +229 -0
  378. package/node_modules/validator/lib/alpha.js +157 -0
  379. package/node_modules/validator/lib/blacklist.js +14 -0
  380. package/node_modules/validator/lib/contains.js +24 -0
  381. package/node_modules/validator/lib/equals.js +14 -0
  382. package/node_modules/validator/lib/escape.js +14 -0
  383. package/node_modules/validator/lib/isAbaRouting.js +23 -0
  384. package/node_modules/validator/lib/isAfter.js +19 -0
  385. package/node_modules/validator/lib/isAlpha.js +31 -0
  386. package/node_modules/validator/lib/isAlphanumeric.js +31 -0
  387. package/node_modules/validator/lib/isAscii.js +18 -0
  388. package/node_modules/validator/lib/isBIC.js +24 -0
  389. package/node_modules/validator/lib/isBase32.js +24 -0
  390. package/node_modules/validator/lib/isBase58.js +16 -0
  391. package/node_modules/validator/lib/isBase64.js +32 -0
  392. package/node_modules/validator/lib/isBefore.js +19 -0
  393. package/node_modules/validator/lib/isBoolean.js +24 -0
  394. package/node_modules/validator/lib/isBtcAddress.js +16 -0
  395. package/node_modules/validator/lib/isByteLength.js +27 -0
  396. package/node_modules/validator/lib/isCreditCard.js +52 -0
  397. package/node_modules/validator/lib/isCurrency.js +83 -0
  398. package/node_modules/validator/lib/isDataURI.js +40 -0
  399. package/node_modules/validator/lib/isDate.js +102 -0
  400. package/node_modules/validator/lib/isDecimal.js +31 -0
  401. package/node_modules/validator/lib/isDivisibleBy.js +15 -0
  402. package/node_modules/validator/lib/isEAN.js +78 -0
  403. package/node_modules/validator/lib/isEmail.js +174 -0
  404. package/node_modules/validator/lib/isEmpty.js +19 -0
  405. package/node_modules/validator/lib/isEthereumAddress.js +15 -0
  406. package/node_modules/validator/lib/isFQDN.js +76 -0
  407. package/node_modules/validator/lib/isFloat.js +22 -0
  408. package/node_modules/validator/lib/isFullWidth.js +14 -0
  409. package/node_modules/validator/lib/isHSL.js +22 -0
  410. package/node_modules/validator/lib/isHalfWidth.js +14 -0
  411. package/node_modules/validator/lib/isHash.js +30 -0
  412. package/node_modules/validator/lib/isHexColor.js +22 -0
  413. package/node_modules/validator/lib/isHexadecimal.js +15 -0
  414. package/node_modules/validator/lib/isIBAN.js +178 -0
  415. package/node_modules/validator/lib/isIMEI.js +49 -0
  416. package/node_modules/validator/lib/isIP.js +67 -0
  417. package/node_modules/validator/lib/isIPRange.js +50 -0
  418. package/node_modules/validator/lib/isISBN.js +56 -0
  419. package/node_modules/validator/lib/isISIN.js +64 -0
  420. package/node_modules/validator/lib/isISO15924.js +16 -0
  421. package/node_modules/validator/lib/isISO31661Alpha2.js +28 -0
  422. package/node_modules/validator/lib/isISO31661Alpha3.js +28 -0
  423. package/node_modules/validator/lib/isISO31661Numeric.js +16 -0
  424. package/node_modules/validator/lib/isISO4217.js +16 -0
  425. package/node_modules/validator/lib/isISO6346.js +35 -0
  426. package/node_modules/validator/lib/isISO6391.js +15 -0
  427. package/node_modules/validator/lib/isISO8601.js +50 -0
  428. package/node_modules/validator/lib/isISRC.js +16 -0
  429. package/node_modules/validator/lib/isISSN.js +28 -0
  430. package/node_modules/validator/lib/isIdentityCard.js +416 -0
  431. package/node_modules/validator/lib/isIn.js +32 -0
  432. package/node_modules/validator/lib/isInt.js +28 -0
  433. package/node_modules/validator/lib/isJSON.js +35 -0
  434. package/node_modules/validator/lib/isJWT.js +24 -0
  435. package/node_modules/validator/lib/isLatLong.js +30 -0
  436. package/node_modules/validator/lib/isLength.js +35 -0
  437. package/node_modules/validator/lib/isLicensePlate.js +67 -0
  438. package/node_modules/validator/lib/isLocale.js +115 -0
  439. package/node_modules/validator/lib/isLowercase.js +14 -0
  440. package/node_modules/validator/lib/isLuhnNumber.js +34 -0
  441. package/node_modules/validator/lib/isMACAddress.js +45 -0
  442. package/node_modules/validator/lib/isMD5.js +15 -0
  443. package/node_modules/validator/lib/isMagnetURI.js +18 -0
  444. package/node_modules/validator/lib/isMailtoURI.js +84 -0
  445. package/node_modules/validator/lib/isMimeType.js +48 -0
  446. package/node_modules/validator/lib/isMobilePhone.js +219 -0
  447. package/node_modules/validator/lib/isMongoId.js +15 -0
  448. package/node_modules/validator/lib/isMultibyte.js +18 -0
  449. package/node_modules/validator/lib/isNumeric.js +19 -0
  450. package/node_modules/validator/lib/isOctal.js +15 -0
  451. package/node_modules/validator/lib/isPassportNumber.js +152 -0
  452. package/node_modules/validator/lib/isPort.js +17 -0
  453. package/node_modules/validator/lib/isPostalCode.js +107 -0
  454. package/node_modules/validator/lib/isRFC3339.js +29 -0
  455. package/node_modules/validator/lib/isRgbColor.js +42 -0
  456. package/node_modules/validator/lib/isSemVer.js +22 -0
  457. package/node_modules/validator/lib/isSlug.js +15 -0
  458. package/node_modules/validator/lib/isStrongPassword.js +99 -0
  459. package/node_modules/validator/lib/isSurrogatePair.js +15 -0
  460. package/node_modules/validator/lib/isTaxID.js +1417 -0
  461. package/node_modules/validator/lib/isTime.js +31 -0
  462. package/node_modules/validator/lib/isULID.js +14 -0
  463. package/node_modules/validator/lib/isURL.js +249 -0
  464. package/node_modules/validator/lib/isUUID.js +32 -0
  465. package/node_modules/validator/lib/isUppercase.js +14 -0
  466. package/node_modules/validator/lib/isVAT.js +274 -0
  467. package/node_modules/validator/lib/isVariableWidth.js +16 -0
  468. package/node_modules/validator/lib/isWhitelisted.js +19 -0
  469. package/node_modules/validator/lib/ltrim.js +16 -0
  470. package/node_modules/validator/lib/matches.js +17 -0
  471. package/node_modules/validator/lib/normalizeEmail.js +140 -0
  472. package/node_modules/validator/lib/rtrim.js +24 -0
  473. package/node_modules/validator/lib/stripLow.js +16 -0
  474. package/node_modules/validator/lib/toBoolean.js +17 -0
  475. package/node_modules/validator/lib/toDate.js +15 -0
  476. package/node_modules/validator/lib/toFloat.js +14 -0
  477. package/node_modules/validator/lib/toInt.js +14 -0
  478. package/node_modules/validator/lib/trim.js +14 -0
  479. package/node_modules/validator/lib/unescape.js +17 -0
  480. package/node_modules/validator/lib/util/algorithms.js +88 -0
  481. package/node_modules/validator/lib/util/assertString.js +12 -0
  482. package/node_modules/validator/lib/util/checkHost.js +20 -0
  483. package/node_modules/validator/lib/util/includesArray.js +14 -0
  484. package/node_modules/validator/lib/util/includesString.js +12 -0
  485. package/node_modules/validator/lib/util/merge.js +22 -0
  486. package/node_modules/validator/lib/util/multilineRegex.js +20 -0
  487. package/node_modules/validator/lib/util/nullUndefinedCheck.js +11 -0
  488. package/node_modules/validator/lib/util/toString.js +21 -0
  489. package/node_modules/validator/lib/util/typeOf.js +18 -0
  490. package/node_modules/validator/lib/whitelist.js +14 -0
  491. package/node_modules/validator/package.json +76 -0
  492. package/node_modules/validator/validator.js +5808 -0
  493. package/node_modules/validator/validator.min.js +23 -0
  494. package/package.json +3 -3
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "intl-messageformat",
3
+ "version": "12.1.3",
4
+ "description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.",
5
+ "keywords": [
6
+ "globalization",
7
+ "i18n",
8
+ "icu",
9
+ "internationalization",
10
+ "intl",
11
+ "localization",
12
+ "messageformat",
13
+ "parser",
14
+ "plural"
15
+ ],
16
+ "homepage": "https://github.com/formatjs/formatjs",
17
+ "bugs": "https://github.com/formatjs/formatjs/issues",
18
+ "license": "BSD-3-Clause",
19
+ "author": "Eric Ferraiuolo <eferraiuolo@gmail.com>",
20
+ "contributors": [
21
+ "Anthony Pipkin <a.pipkin@yahoo.com>",
22
+ "Caridy Patino <caridy@gmail.com>",
23
+ "Drew Folta <drew@folta.net>",
24
+ "Long Ho <holevietlong@gmail.com>"
25
+ ],
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git@github.com:formatjs/formatjs.git"
29
+ },
30
+ "type": "module",
31
+ "sideEffects": false,
32
+ "types": "index.d.ts",
33
+ "exports": {
34
+ ".": "./index.js"
35
+ },
36
+ "dependencies": {
37
+ "@formatjs/fast-memoize": "3.1.7",
38
+ "@formatjs/icu-messageformat-parser": "3.5.21"
39
+ }
40
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Jake Boone
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,306 @@
1
+ [![npm][badge-npm]](https://www.npmjs.com/package/numeric-quantity)
2
+ ![workflow status](https://github.com/jakeboone02/numeric-quantity/actions/workflows/main.yml/badge.svg)
3
+ [![codecov.io](https://codecov.io/github/jakeboone02/numeric-quantity/coverage.svg?branch=main)](https://codecov.io/github/jakeboone02/numeric-quantity?branch=main)
4
+ [![downloads](https://img.shields.io/npm/dm/numeric-quantity.svg)](https://npm-stat.com/charts.html?package=numeric-quantity&from=2015-08-01)
5
+ [![MIT License](https://img.shields.io/npm/l/numeric-quantity.svg)](https://opensource.org/licenses/MIT)
6
+ [![pkg.pr.new](https://pkg.pr.new/badge/jakeboone02/numeric-quantity)](https://pkg.pr.new/~/jakeboone02/numeric-quantity)
7
+
8
+ Converts a string to a number, like an enhanced version of `parseFloat`. Returns `NaN` if the provided string does not resemble a number.
9
+
10
+ **[Full documentation](https://jakeboone02.github.io/numeric-quantity/)**
11
+
12
+ In addition to plain integers and decimals, `numeric-quantity` handles:
13
+
14
+ - **Fractions and mixed numbers**: `'1 2/3'` → `1.667`, `'1⅖'` → `1.4`, `'1 2⁄3'` → `1.667`
15
+ - **Separators**: `'1,000'` → `1000`, `'1_000_000'` → `1000000`
16
+ - **Roman numerals** (see [option](#roman-numerals-romannumerals) below): `'XIV'` → `14`, `'Ⅻ'` → `12`
17
+ - **Non-ASCII numerals**: Arabic-Indic (`'٣'`), Devanagari (`'३'`), Bengali, Thai, Fullwidth, and 70+ other Unicode digit scripts
18
+
19
+ > _For the inverse operation—converting a number to an imperial measurement—check out [format-quantity](https://www.npmjs.com/package/format-quantity)._
20
+
21
+ > _For a more complete solution to parsing recipe ingredients, try [parse-ingredient](https://www.npmjs.com/package/parse-ingredient)._
22
+
23
+ ## Usage
24
+
25
+ ### Installed
26
+
27
+ ```js
28
+ import { numericQuantity } from 'numeric-quantity';
29
+
30
+ console.log(numericQuantity('1 1/2')); // 1.5
31
+ console.log(numericQuantity('2 2/3')); // 2.667
32
+ ```
33
+
34
+ ### CDN
35
+
36
+ As an ES module:
37
+
38
+ ```html
39
+ <script type="module">
40
+ import { numericQuantity } from 'https://cdn.jsdelivr.net/npm/numeric-quantity/+esm';
41
+
42
+ console.log(numericQuantity('10½')); // 10.5
43
+ </script>
44
+ ```
45
+
46
+ As UMD (all exports are properties of the global object `NumericQuantity`):
47
+
48
+ ```html
49
+ <script src="https://unpkg.com/numeric-quantity"></script>
50
+ <script>
51
+ console.log(NumericQuantity.numericQuantity('xii', { romanNumerals: true })); // 12
52
+ </script>
53
+ ```
54
+
55
+ ## Options
56
+
57
+ All options are passed as the second argument to `numericQuantity` (and `isNumericQuantity`).
58
+
59
+ ### Rounding (`round`)
60
+
61
+ Results are rounded to three decimal places by default. Use the `round` option to change this behavior.
62
+
63
+ ```js
64
+ numericQuantity('1/3'); // 0.333 (default: 3 decimal places)
65
+ numericQuantity('1/3', { round: 5 }); // 0.33333
66
+ numericQuantity('1/3', { round: false }); // 0.3333333333333333
67
+ ```
68
+
69
+ Coercion rules:
70
+
71
+ - Non-finite values (`NaN`, `Infinity`, `-Infinity`) are treated as `false`, i.e. no rounding.
72
+ - Negative values clamp to `0`, i.e. round to a whole number.
73
+ - `round` does not apply to `bigint` results (see [`bigIntOnOverflow`](#large-numbers-bigintonoverflow)).
74
+ - When the `percentage` option divides by 100, `round` applies to the value _as written_, before the division (see [Percentages](#percentages-percentage)).
75
+
76
+ ### Trailing Invalid Characters (`allowTrailingInvalid`)
77
+
78
+ By default, strings with trailing non-numeric characters return `NaN`. Set `allowTrailingInvalid: true` to ignore trailing invalid characters, similar to `parseFloat`.
79
+
80
+ ```js
81
+ numericQuantity('100abc'); // NaN
82
+ numericQuantity('100abc', { allowTrailingInvalid: true }); // 100
83
+ ```
84
+
85
+ ### Roman Numerals (`romanNumerals`)
86
+
87
+ Parse Roman numerals (ASCII or Unicode) by setting `romanNumerals: true`. You can also use `parseRomanNumerals` directly.
88
+
89
+ ```js
90
+ numericQuantity('MCCXIV', { romanNumerals: true }); // 1214
91
+ numericQuantity('Ⅻ', { romanNumerals: true }); // 12
92
+ numericQuantity('xiv', { romanNumerals: true }); // 14 (case-insensitive)
93
+ ```
94
+
95
+ ### Decimal Separator (`decimalSeparator`)
96
+
97
+ For European-style numbers where comma is the decimal separator, set `decimalSeparator: ','`.
98
+
99
+ ```js
100
+ numericQuantity('1,5'); // 15 (comma treated as thousands separator)
101
+ numericQuantity('1,5', { decimalSeparator: ',' }); // 1.5
102
+ numericQuantity('1.000,50', { decimalSeparator: ',' }); // 1000.5
103
+ ```
104
+
105
+ ### Large Numbers (`bigIntOnOverflow`)
106
+
107
+ When the parsed value exceeds `Number.MAX_SAFE_INTEGER` or is less than `Number.MIN_SAFE_INTEGER`, set `bigIntOnOverflow: true` to return a `bigint` instead.
108
+
109
+ ```js
110
+ numericQuantity('9007199254740993'); // 9007199254740992 (loses precision)
111
+ numericQuantity('9007199254740993', { bigIntOnOverflow: true }); // 9007199254740993n
112
+ ```
113
+
114
+ This applies to _any_ overflowing value, not just integers as written—decimals, fractions, mixed numbers, and exponents all participate. The value is evaluated exactly as a rational number and only rounded at the end.
115
+
116
+ ```js
117
+ const opts = { bigIntOnOverflow: true };
118
+ numericQuantity('9007199254740993.5', opts); // 9007199254740994n (half-up)
119
+ numericQuantity('-9007199254740993.5', opts); // -9007199254740994n (half away from zero)
120
+ numericQuantity('9007199254740993 1/2', opts); // 9007199254740994n
121
+ numericQuantity('9007199254740993e1', opts); // 90071992547409930n (exact, no rounding)
122
+ ```
123
+
124
+ Notes:
125
+
126
+ - **Fractional tails are unrecoverable anyway.** Past `Number.MAX_SAFE_INTEGER` the gap between adjacent `number` values is 2, so no `number` can carry a fraction at that magnitude. Rounding to a `bigint` loses less than falling back to `number` would.
127
+ - **`round` is not consulted.** `bigint` has no fractional representation, so `round: false` does not disable the half-up rounding.
128
+ - **Rounding can _cause_ overflow.** `numericQuantity('9007199254740991.6', opts)` is `9007199254740992n`, even though the integer part as written is within range.
129
+ - **`percentage` division is folded in exactly**, as a factor of `100n` in the denominator, so it is subject to the same single half-up rounding at the end.
130
+
131
+ ```js
132
+ const opts = { bigIntOnOverflow: true, percentage: true };
133
+ numericQuantity('900719925474099300%', opts); // 9007199254740993n (exact)
134
+ numericQuantity('900719925474099399%', opts); // 9007199254740994n (rounded)
135
+ ```
136
+
137
+ ### Percentages (`percentage`)
138
+
139
+ Parse percentage strings by setting the `percentage` option. Use `'decimal'` (or `true`) to divide by 100, or `'number'` to just strip the `%` symbol.
140
+
141
+ ```js
142
+ numericQuantity('50%'); // NaN
143
+ numericQuantity('50%', { percentage: true }); // 0.5
144
+ numericQuantity('50%', { percentage: 'decimal' }); // 0.5
145
+ numericQuantity('50%', { percentage: 'number' }); // 50
146
+ numericQuantity('1/2%', { percentage: true }); // 0.005
147
+ ```
148
+
149
+ `round` applies to the value as written, _before_ the division by 100, so the requested number of decimal places is not silently reduced:
150
+
151
+ ```js
152
+ numericQuantity('12.345%', { percentage: true, round: 3 }); // 0.12345, not 0.123
153
+ numericQuantity('1%', { percentage: true, round: 0 }); // 0.01
154
+ numericQuantity('1.0%', { percentage: true, round: 0 }); // 0.01
155
+ numericQuantity('1/1%', { percentage: true, round: 0 }); // 0.01
156
+ ```
157
+
158
+ Roman numerals honor `percentage` as well:
159
+
160
+ ```js
161
+ numericQuantity('L%', { percentage: true, romanNumerals: true }); // 0.5
162
+ ```
163
+
164
+ ### Currency Symbols (`allowCurrency`)
165
+
166
+ Strip currency symbols from the start or end of the string by setting `allowCurrency: true`. Supports all Unicode currency symbols (`$`, `€`, `£`, `¥`, `₹`, `₽`, `₿`, `₩`, etc.).
167
+
168
+ ```js
169
+ numericQuantity('$100'); // NaN
170
+ numericQuantity('$100', { allowCurrency: true }); // 100
171
+ numericQuantity('€1.000,50', { allowCurrency: true, decimalSeparator: ',' }); // 1000.5
172
+ numericQuantity('100€', { allowCurrency: true }); // 100
173
+ numericQuantity('-$50', { allowCurrency: true }); // -50
174
+ ```
175
+
176
+ Currency symbols and the `%` suffix may appear in either order, but at most one `%` is stripped per parse:
177
+
178
+ ```js
179
+ const opts = { allowCurrency: true, percentage: true };
180
+ numericQuantity('50%€', opts); // 0.5
181
+ numericQuantity('100€%', opts); // 1
182
+ numericQuantity('100 € %', opts); // 1
183
+ numericQuantity('50%%', opts); // NaN
184
+ numericQuantity('50%€%', opts); // NaN
185
+ ```
186
+
187
+ ### Verbose Output (`verbose`)
188
+
189
+ Set `verbose: true` to return a detailed result object instead of just the numeric value. This is useful for understanding what was parsed and stripped.
190
+
191
+ ```js
192
+ numericQuantity('$50%', {
193
+ verbose: true,
194
+ allowCurrency: true,
195
+ percentage: true,
196
+ });
197
+ // {
198
+ // value: 0.5,
199
+ // input: '$50%',
200
+ // currencyPrefix: '$',
201
+ // percentageSuffix: true
202
+ // }
203
+
204
+ numericQuantity('100abc', {
205
+ verbose: true,
206
+ allowTrailingInvalid: true,
207
+ });
208
+ // {
209
+ // value: 100,
210
+ // input: '100abc',
211
+ // trailingInvalid: 'abc'
212
+ // }
213
+ ```
214
+
215
+ For fraction and mixed-number inputs, the result also includes parsed fraction components (always unsigned):
216
+
217
+ ```js
218
+ numericQuantity('1 2/3', { verbose: true });
219
+ // {
220
+ // value: 1.667,
221
+ // input: '1 2/3',
222
+ // whole: 1,
223
+ // numerator: 2,
224
+ // denominator: 3
225
+ // }
226
+
227
+ numericQuantity('½', { verbose: true });
228
+ // {
229
+ // value: 0.5,
230
+ // input: '½',
231
+ // numerator: 1,
232
+ // denominator: 2
233
+ // }
234
+ ```
235
+
236
+ The verbose result object has the following shape:
237
+
238
+ ```ts
239
+ interface NumericQuantityVerboseResult {
240
+ value: number | bigint; // The parsed value (NaN if invalid)
241
+ input: string; // Original input string
242
+ currencyPrefix?: string; // Currency symbol(s) stripped from start
243
+ currencySuffix?: string; // Currency symbol(s) stripped from end
244
+ percentageSuffix?: boolean; // True if "%" was stripped
245
+ trailingInvalid?: string; // Characters ignored (if allowTrailingInvalid)
246
+ sign?: '-' | '+'; // Leading sign character, if present
247
+ whole?: number; // Whole part of a mixed fraction (e.g. 1 from "1 2/3")
248
+ numerator?: number; // Fraction numerator (e.g. 2 from "1 2/3")
249
+ denominator?: number; // Fraction denominator (e.g. 3 from "1 2/3")
250
+ }
251
+ ```
252
+
253
+ ## `Infinity`
254
+
255
+ `Infinity` is a valid result, not an error. Division by zero and overflowing exponents both produce it, and `isNumericQuantity` returns `true` for them.
256
+
257
+ ```js
258
+ numericQuantity('1/0'); // Infinity
259
+ numericQuantity('1e400'); // Infinity
260
+ isNumericQuantity('1/0'); // true
261
+ ```
262
+
263
+ ## Additional Exports
264
+
265
+ ### `isNumericQuantity(str, options?): boolean`
266
+
267
+ Returns `true` if the string can be parsed as a valid number, `false` otherwise. Accepts the same options as `numericQuantity`.
268
+
269
+ ```js
270
+ import { isNumericQuantity } from 'numeric-quantity';
271
+
272
+ isNumericQuantity('1 1/2'); // true
273
+ isNumericQuantity('abc'); // false
274
+ isNumericQuantity('XII', { romanNumerals: true }); // true
275
+ isNumericQuantity('$100', { allowCurrency: true }); // true
276
+ isNumericQuantity('50%', { percentage: true }); // true
277
+ ```
278
+
279
+ ### `parseRomanNumerals(str): number`
280
+
281
+ Parses a string of Roman numerals directly. Returns `NaN` for invalid input.
282
+
283
+ ```js
284
+ import { parseRomanNumerals } from 'numeric-quantity';
285
+
286
+ parseRomanNumerals('MCMXCIX'); // 1999
287
+ parseRomanNumerals('Ⅻ'); // 12
288
+ parseRomanNumerals('invalid'); // NaN
289
+ ```
290
+
291
+ ### Constants and utilities
292
+
293
+ The internals used by the parser are also part of the public API and are safe to depend on:
294
+
295
+ | Export | Description |
296
+ | ------------------------------------------------------------ | ------------------------------------------------------------------------ |
297
+ | `normalizeDigits(str)` | Converts non-ASCII decimal digits (70+ Unicode scripts) to ASCII `0`–`9` |
298
+ | `numericRegex` | The core pattern matched against a fully normalized string |
299
+ | `numericRegexWithTrailingInvalid` | Same, but with a trailing capture group for `allowTrailingInvalid` |
300
+ | `vulgarFractionToAsciiMap` / `vulgarFractionsRegex` | Vulgar fraction characters (`½`, `⅔`, …) and their ASCII equivalents |
301
+ | `superSubDigitToAsciiMap` / `superSubDigitsRegex` | Superscript/subscript digits (`¹`, `₂`, …) and their ASCII equivalents |
302
+ | `romanNumeralValues` / `romanNumeralRegex` | Roman numeral values and the validation pattern |
303
+ | `romanNumeralUnicodeToAsciiMap` / `romanNumeralUnicodeRegex` | Unicode Roman numeral characters (`Ⅻ`, …) and their ASCII equivalents |
304
+ | `defaultOptions` | The fully-resolved default option set |
305
+
306
+ [badge-npm]: https://img.shields.io/npm/v/numeric-quantity.svg?cacheSeconds=3600&logo=npm
@@ -0,0 +1 @@
1
+ export * from './numeric-quantity.cjs.development.js';
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ if (process.env.NODE_ENV === 'production') {
3
+ module.exports = require('./numeric-quantity.cjs.production.js');
4
+ } else {
5
+ module.exports = require('./numeric-quantity.cjs.development.js');
6
+ }
@@ -0,0 +1,293 @@
1
+ //#region src/types.d.ts
2
+ export interface NumericQuantityOptions {
3
+ /**
4
+ * Round the result to this many decimal places. Defaults to 3; must
5
+ * be greater than or equal to zero.
6
+ *
7
+ * @default 3
8
+ */
9
+ round?: number | false;
10
+ /**
11
+ * Allow and ignore trailing invalid characters _à la_ `parseFloat`.
12
+ *
13
+ * @default false
14
+ */
15
+ allowTrailingInvalid?: boolean;
16
+ /**
17
+ * Attempt to parse Roman numerals if Arabic numeral parsing fails.
18
+ *
19
+ * @default false
20
+ */
21
+ romanNumerals?: boolean;
22
+ /**
23
+ * Generates a `bigint` value if the string represents
24
+ * a valid integer too large for the `number` type.
25
+ */
26
+ bigIntOnOverflow?: boolean;
27
+ /**
28
+ * Specifies which character ("." or ",") to treat as the decimal separator.
29
+ *
30
+ * @default "."
31
+ */
32
+ decimalSeparator?: "," | ".";
33
+ /**
34
+ * Allow and strip currency symbols (Unicode `\p{Sc}` category) from the
35
+ * start and/or end of the string.
36
+ *
37
+ * @default false
38
+ */
39
+ allowCurrency?: boolean;
40
+ /**
41
+ * Parse percentage strings by stripping the `%` suffix.
42
+ * - `'decimal'` or `true`: `"50%"` → `0.5` (divide by 100)
43
+ * - `'number'`: `"50%"` → `50` (strip `%`, keep value)
44
+ * - `false` or omitted: `"50%"` → `NaN` (default behavior)
45
+ *
46
+ * @default false
47
+ */
48
+ percentage?: "decimal" | "number" | boolean;
49
+ /**
50
+ * Return a verbose result object with additional parsing metadata.
51
+ *
52
+ * @default false
53
+ */
54
+ verbose?: boolean;
55
+ }
56
+ /**
57
+ * Extracts the type of the `verbose` option from an options type, defaulting to `false`.
58
+ */
59
+ export type VerboseOption<T> = T extends {
60
+ verbose?: infer V;
61
+ } ? V : false;
62
+ /**
63
+ * Extracts the type of the `bigIntOnOverflow` option from an options type,
64
+ * defaulting to `false`.
65
+ */
66
+ export type BigIntOnOverflowOption<T> = T extends {
67
+ bigIntOnOverflow?: infer B;
68
+ } ? B : false;
69
+ /**
70
+ * Resolves the return type of {@link numericQuantity} based on the options provided.
71
+ *
72
+ * @remarks
73
+ * Inference requires the options object to have literal types. An options object
74
+ * annotated as `const opts: NumericQuantityOptions = { ... }` widens every option to
75
+ * `boolean | undefined`, so the return type is the full
76
+ * `number | bigint | NumericQuantityVerboseResult` union. Use
77
+ * `satisfies NumericQuantityOptions` instead of a `:` annotation to retain literal
78
+ * inference.
79
+ */
80
+ export type NumericQuantityReturnType<T extends NumericQuantityOptions | undefined | null = undefined> = boolean extends VerboseOption<T> ? number | bigint | NumericQuantityVerboseResult : true extends VerboseOption<T> ? NumericQuantityVerboseResult : boolean extends BigIntOnOverflowOption<T> ? number | bigint : true extends BigIntOnOverflowOption<T> ? number | bigint : number;
81
+ /**
82
+ * Verbose result returned when `verbose: true` is set.
83
+ */
84
+ export interface NumericQuantityVerboseResult {
85
+ /** The parsed numeric value (NaN if invalid). */
86
+ value: number | bigint;
87
+ /** The original input, coerced to a string (`symbol` input becomes e.g. `'Symbol(1)'`). */
88
+ input: string;
89
+ /** Currency symbol(s) stripped from the start, if any. */
90
+ currencyPrefix?: string;
91
+ /** Currency symbol(s) stripped from the end, if any. */
92
+ currencySuffix?: string;
93
+ /** True if a `%` suffix was stripped. */
94
+ percentageSuffix?: boolean;
95
+ /** Trailing invalid (usually non-numeric) characters detected in the input, if any. Populated even when `allowTrailingInvalid` is `false`. */
96
+ trailingInvalid?: string;
97
+ /** The leading sign character (`'-'` or `'+'`), if present. Omitted when no explicit sign was in the input. */
98
+ sign?: "-" | "+";
99
+ /** The whole-number part of a mixed fraction (e.g. `1` from `"1 2/3"`). Omitted for pure fractions, decimals, and integers. */
100
+ whole?: number;
101
+ /** The numerator of a fraction (e.g. `2` from `"1 2/3"`, or `1` from `"1/2"`). Always unsigned. */
102
+ numerator?: number;
103
+ /** The denominator of a fraction (e.g. `3` from `"1 2/3"`, or `2` from `"1/2"`). Always unsigned. */
104
+ denominator?: number;
105
+ }
106
+ /**
107
+ * Unicode vulgar fraction code points.
108
+ */
109
+ export type VulgarFraction = "¼" | "½" | "¾" | "⅐" | "⅑" | "⅒" | "⅓" | "⅔" | "⅕" | "⅖" | "⅗" | "⅘" | "⅙" | "⅚" | "⅛" | "⅜" | "⅝" | "⅞" | "⅟";
110
+ /**
111
+ * Unicode superscript digit code points.
112
+ */
113
+ export type SuperscriptDigit = "⁰" | "¹" | "²" | "³" | "⁴" | "⁵" | "⁶" | "⁷" | "⁸" | "⁹";
114
+ /**
115
+ * Unicode subscript digit code points.
116
+ */
117
+ export type SubscriptDigit = "₀" | "₁" | "₂" | "₃" | "₄" | "₅" | "₆" | "₇" | "₈" | "₉";
118
+ /**
119
+ * Allowable Roman numeral characters (ASCII, uppercase only).
120
+ */
121
+ export type RomanNumeralAscii = "I" | "V" | "X" | "L" | "C" | "D" | "M";
122
+ /**
123
+ * Unicode Roman numeral code points (uppercase and lowercase,
124
+ * representing 1-12, 50, 100, 500, and 1000).
125
+ */
126
+ export type RomanNumeralUnicode = "Ⅰ" | "Ⅱ" | "Ⅲ" | "Ⅳ" | "Ⅴ" | "Ⅵ" | "Ⅶ" | "Ⅷ" | "Ⅸ" | "Ⅹ" | "Ⅺ" | "Ⅻ" | "Ⅼ" | "Ⅽ" | "Ⅾ" | "Ⅿ" | "ⅰ" | "ⅱ" | "ⅲ" | "ⅳ" | "ⅴ" | "ⅵ" | "ⅶ" | "ⅷ" | "ⅸ" | "ⅹ" | "ⅺ" | "ⅻ" | "ⅼ" | "ⅽ" | "ⅾ" | "ⅿ";
127
+ /**
128
+ * Union of ASCII and Unicode Roman numeral characters/code points.
129
+ */
130
+ export type RomanNumeral = RomanNumeralAscii | RomanNumeralUnicode;
131
+ //#endregion
132
+ //#region src/constants.d.ts
133
+ /**
134
+ * Normalizes non-ASCII decimal digits to ASCII digits.
135
+ * Converts characters from Unicode decimal digit blocks (e.g., Arabic-Indic,
136
+ * Devanagari, Bengali) to their ASCII equivalents (0-9).
137
+ *
138
+ * All current Unicode \p{Nd} blocks are included in decimalDigitBlockStarts.
139
+ */
140
+ export declare const normalizeDigits: (str: string) => string;
141
+ /**
142
+ * Map of Unicode superscript and subscript digit code points to ASCII digits.
143
+ */
144
+ export declare const superSubDigitToAsciiMap: Record<SuperscriptDigit | SubscriptDigit, `${number}`>;
145
+ /**
146
+ * Captures Unicode superscript and subscript digits.
147
+ */
148
+ export declare const superSubDigitsRegex: RegExp;
149
+ /**
150
+ * Map of Unicode fraction code points to their ASCII equivalents.
151
+ */
152
+ export declare const vulgarFractionToAsciiMap: Record<VulgarFraction, `${number}/${number | ""}`>;
153
+ /**
154
+ * Captures the individual elements of a numeric string. Commas and underscores are allowed
155
+ * as separators, as long as they appear between digits and are not consecutive.
156
+ *
157
+ * Capture groups:
158
+ *
159
+ * | # | Description | Example(s) |
160
+ * | --- | -------------------------------------------------- | ----------------------------------------------------------------------- |
161
+ * | `0` | entire match | `"2 1/3"` from `"2 1/3"` |
162
+ * | `1` | sign (`-` or `+`) | `"-"` from `"-2 1/3"` |
163
+ * | `2` | whole number or numerator | `"2"` from `"2 1/3"`; `"1"` from `"1/3"` |
164
+ * | `3` | entire tail: fraction, decimal, and/or exponent | `" 1/3"` from `"2 1/3"`; `".23"` from `"1.23"`; `".5e3"` from `"1.5e3"` |
165
+ * | `4` | exponent, when there is no decimal portion | `"e3"` from `"1e3"` |
166
+ * | `5` | exponent, when there is a decimal portion | `"e-3"` from `"1.5e-3"` |
167
+ * | `6` | numerator of a mixed number (incl. leading space) | `" 2"` from `"1 2/3"` |
168
+ *
169
+ * Groups 4–6 are subgroups of group 3 and are not used directly by
170
+ * {@link numericQuantity}; only groups 1–3 are consumed.
171
+ *
172
+ * _Capture groups 2 and 3 may include comma/underscore separators._
173
+ *
174
+ * @example
175
+ *
176
+ * ```ts
177
+ * numericRegex.exec("1") // [ "1", null, "1", null, null, null, null ]
178
+ * numericRegex.exec("1.23") // [ "1.23", null, "1", ".23", null, null, null ]
179
+ * numericRegex.exec("1 2/3") // [ "1 2/3", null, "1", " 2/3", null, null, " 2" ]
180
+ * numericRegex.exec("2/3") // [ "2/3", null, "2", "/3", null, null, null ]
181
+ * numericRegex.exec("2 / 3") // [ "2 / 3", null, "2", " / 3", null, null, null ]
182
+ * numericRegex.exec("-2 1/3") // [ "-2 1/3", "-", "2", " 1/3", null, null, " 1" ]
183
+ * numericRegex.exec("1e3") // [ "1e3", null, "1", "e3", "e3", null, null ]
184
+ * numericRegex.exec("1.5e-3") // [ "1.5e-3", null, "1", ".5e-3", null, "e-3", null ]
185
+ * numericRegex.exec("1,000") // [ "1,000", null, "1,000", null, null, null, null ]
186
+ * ```
187
+ *
188
+ * @remarks
189
+ *
190
+ * This pattern and {@link numericRegexWithTrailingInvalid} are maintained as two separate
191
+ * literals and must be kept in sync. They differ _only_ in the tail: `$` here versus
192
+ * `(\s*[^.\d/].*)?` there. `src/index.test.ts` asserts that equality.
193
+ *
194
+ * Group 2 is `((?:\d(?:[,_]\d|\d)*)?)`, deliberately `?` and not `*`. Every string the
195
+ * inner group matches begins and ends with a digit, so concatenating two of them yields
196
+ * another string of the same shape: an outer `*` would add no strings to the language,
197
+ * only exponentially many ways to split one digit run across iterations. That made a
198
+ * failing match catastrophically backtrack — `'1'.repeat(30) + '!'` took ~15s on V8.
199
+ */
200
+ export declare const numericRegex: RegExp;
201
+ /**
202
+ * Same as {@link numericRegex}, but allows (and ignores) trailing invalid characters.
203
+ * Capture groups 1–6 are identical to {@link numericRegex}'s; capture group 7 contains the
204
+ * trailing invalid portion.
205
+ *
206
+ * @example
207
+ *
208
+ * ```ts
209
+ * numericRegexWithTrailingInvalid.exec("1abc")
210
+ * // [ "1abc", null, "1", null, null, null, null, "abc" ]
211
+ * numericRegexWithTrailingInvalid.exec("1 2/3 xyz")
212
+ * // [ "1 2/3 xyz", null, "1", " 2/3", null, null, " 2", " xyz" ]
213
+ * ```
214
+ *
215
+ * @remarks
216
+ *
217
+ * Must be kept in sync with {@link numericRegex} — see that pattern's remarks.
218
+ */
219
+ export declare const numericRegexWithTrailingInvalid: RegExp;
220
+ /**
221
+ * Captures any Unicode vulgar fractions.
222
+ */
223
+ export declare const vulgarFractionsRegex: RegExp;
224
+ /**
225
+ * Map of Roman numeral sequences to their decimal equivalents.
226
+ */
227
+ export declare const romanNumeralValues: { [k in `${RomanNumeralAscii}` | `${RomanNumeralAscii}${RomanNumeralAscii}` | `${RomanNumeralAscii}${RomanNumeralAscii}${RomanNumeralAscii}` | `${RomanNumeralAscii}${RomanNumeralAscii}${RomanNumeralAscii}${RomanNumeralAscii}`]?: number; };
228
+ /**
229
+ * Map of Unicode Roman numeral code points to their ASCII equivalents.
230
+ */
231
+ export declare const romanNumeralUnicodeToAsciiMap: Record<RomanNumeralUnicode, keyof typeof romanNumeralValues>;
232
+ /**
233
+ * Captures all Unicode Roman numeral code points.
234
+ */
235
+ export declare const romanNumeralUnicodeRegex: RegExp;
236
+ /**
237
+ * Captures a valid Roman numeral sequence.
238
+ *
239
+ * Capture groups:
240
+ *
241
+ * | # | Description | Example |
242
+ * | --- | --------------- | ------------------------ |
243
+ * | `0` | Entire string | "MCCXIV" from "MCCXIV" |
244
+ * | `1` | Thousands | "M" from "MCCXIV" |
245
+ * | `2` | Hundreds | "CC" from "MCCXIV" |
246
+ * | `3` | Tens | "X" from "MCCXIV" |
247
+ * | `4` | Ones | "IV" from "MCCXIV" |
248
+ *
249
+ * @example
250
+ *
251
+ * ```ts
252
+ * romanNumeralRegex.exec("M") // [ "M", "M", "", "", "" ]
253
+ * romanNumeralRegex.exec("XII") // [ "XII", "", "", "X", "II" ]
254
+ * romanNumeralRegex.exec("MCCXIV") // [ "MCCXIV", "M", "CC", "X", "IV" ]
255
+ * ```
256
+ */
257
+ export declare const romanNumeralRegex: RegExp;
258
+ /**
259
+ * Default options for {@link numericQuantity}.
260
+ */
261
+ export declare const defaultOptions: Required<NumericQuantityOptions>;
262
+ //#endregion
263
+ //#region src/isNumericQuantity.d.ts
264
+ /**
265
+ * Checks if a value represents a valid numeric quantity.
266
+ *
267
+ * Returns `true` if the value can be parsed as a number, `false` otherwise.
268
+ * Accepts the same options as `numericQuantity`.
269
+ */
270
+ export declare const isNumericQuantity: (quantity: unknown, options?: NumericQuantityOptions) => boolean;
271
+ //#endregion
272
+ //#region src/numericQuantity.d.ts
273
+ /**
274
+ * Converts a string to a number, like an enhanced version of `parseFloat`.
275
+ *
276
+ * The string can include mixed numbers, vulgar fractions, or Roman numerals.
277
+ * Input is expected to be a `string`, but will be coerced to `string` if necessary.
278
+ */
279
+ declare function numericQuantity(quantity: unknown): number;
280
+ declare function numericQuantity<const T extends NumericQuantityOptions | undefined | null>(quantity: unknown, options: T): NumericQuantityReturnType<T>;
281
+ //#endregion
282
+ //#region src/parseRomanNumerals.d.ts
283
+ /**
284
+ * Converts a string of Roman numerals to a number, like `parseInt`
285
+ * for Roman numerals. Uses modern, strict rules (only 1 to 3999).
286
+ *
287
+ * The string can include ASCII representations of Roman numerals
288
+ * or Unicode Roman numeral code points (`U+2160` through `U+217F`).
289
+ */
290
+ export declare const parseRomanNumerals: (romanNumerals: string) => number;
291
+ //#endregion
292
+ export { numericQuantity };
293
+ //# sourceMappingURL=numeric-quantity.cjs.development.d.ts.map