n2words
Version:
Convert numbers to words in 70+ languages with zero dependencies. Supports BigInt, decimals, and browser/Node.js environments.
15 lines (14 loc) • 603 B
TypeScript
/**
* Ordinal value parsing utility.
* Optimized parser for ordinal conversion - accepts only positive integers.
* @module parse-ordinal
*/
/**
* Parses a value for ordinal conversion.
* Ordinals require positive integers only (no zero, negatives, or decimals).
* @param {number|string|bigint} value - The value to parse
* @returns {bigint} The positive integer value
* @throws {TypeError} If value is not number, string, or bigint
* @throws {RangeError} If value is zero, negative, or has a decimal part
*/
export declare function parseOrdinalValue(value: number | string | bigint): bigint;