UNPKG

numeric-quantity

Version:

Number parser with support for mixed numbers, vulgar fractions, and Roman numerals

14 lines (13 loc) 630 B
import type { NumericQuantityOptions } from "./types.mjs"; /** * Converts a string to a number, like an enhanced version of `parseFloat`. * * The string can include mixed numbers, vulgar fractions, or Roman numerals. */ declare function numericQuantity(quantity: string | number): number; declare function numericQuantity(quantity: string | number): number; declare function numericQuantity(quantity: string | number, options: NumericQuantityOptions & { bigIntOnOverflow: true }): number | bigint; declare function numericQuantity(quantity: string | number, options?: NumericQuantityOptions): number; export { numericQuantity };