parseUnits โ
Multiplies a string representation of a number by a given exponent of base 10 (10exponent).
Import โ
ts
import { parseUnits } from 'viem'
Usage โ
ts
import { parseUnits } from 'viem'
parseUnits('420', 9)
// 420000000000n
Returns โ
bigint
Parameters โ
value โ
- Type:
string
The string representation of the number to multiply.
exponent โ
- Type:
number
The exponent.