Unit formatter

[blockchain/ethereum/Unit formatter]


Returns a string representation of value formatted with unit digits . See: https://docs.ethers.io/v5/api/utils/display-logic/#utils-formatUnits


Keywords: ethers, decimals, BigNumber

Input ports

  • units: {string: any}

    The value as BigNumber

  • decimals: number

    The number of decimals to represent the unit. Defaults to 18.

Output ports

  • result: string

    The string representation of value formatted with unit digits.

Last updated