UNPKG

@0xtorch/big-decimal

Version:

An arbitrary precision Decimal type for TypeScript that extends BigInt.

10 lines (8 loc) 216 B
import type { BigDecimal } from './type' export const absoluteValue = (value: BigDecimal): BigDecimal => value.value >= 0 ? value : { value: -value.value, decimals: value.decimals, }