Function formatUnits

  • Function to format a number in a decimal point number

    Example

    const amount = formatUnits("123456", 8);
    console.log(amount);
    // '0.00123456'

    Parameters

    • value: string | number | bigint
    • decimals: number

    Returns string

Generated using TypeDoc