ethers.js/docs/v5/api/utils/display-logic
2020-07-05 00:02:47 -04:00
..
index.html Updated docs build. 2020-07-05 00:02:47 -04:00
README.md Updated docs build. 2020-07-03 01:54:56 -04:00

Documentation: html

Display Logic and Input

Units

Decimal Count

Named Units

Functions

Formatting

ethers . utils . commify( value ) => string

Returns a string with value grouped by 3 digits, separated by ,.

Conversion

ethers . utils . formatUnits( value [ , unit = "ether" ] ) => string

Returns a string representation of value formatted with unit digits (if it is a number) or to the unit specified (if a string).

ethers . utils . formatEther( value ) => string

The equivalent to calling formatUnits(value, "ether").

ethers . utils . parseUnits( value [ , unit = "ether" ] ) => BigNumber

Returns a BigNumber representation of value, parsed with unit digits (if it is a number) or from the unit specified (if a string).

ethers . utils . parseEther( value ) => BigNumber

The equivalent to calling parseUnits(value, "ether").