UNPKG

i18n-js

Version:

A small library to provide I18n on JavaScript.

14 lines 388 B
import BigNumber from "bignumber.js"; export function parseBigNumber(input, raise = false) { let output = BigNumber(NaN); try { output = new BigNumber(input); } catch (_a) { if (raise && output.isNaN()) { throw new Error(`"${input}" is not a valid numeric value`); } } return output; } //# sourceMappingURL=parseBigNumber.js.map