viem
Version:
16 lines • 459 B
JavaScript
import * as Value from './Value.js';
/**
* Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number..
*
* - Docs: https://viem.sh/docs/utilities/formatUnits
*
* @example
* import { formatUnits } from 'viem'
*
* formatUnits(420000000000n, 9)
* // '420'
*/
export function formatUnits(value, decimals) {
return Value.format(value, decimals);
}
//# sourceMappingURL=formatUnits.js.map