• Multiplies a string representation of a number by a given exponent of base 10 (10exponent).

    Parameters

    • value: string | number | bigint
    • decimals: number
    • Optional roundDown: boolean

    Returns bigint

    A BigInt number

    Example

    scale('112', 18) // 112000000000000000000n
    scale(112, 18) // 112000000000000000000n
    scale(112.5632, 0) // 113n
    scale(112.5632, 0, true) // 112n