parseUnits(value)
Feature
Converts the "decimal string" value to a integer string, assuming decimal places. The decimal number can be set with setDecimal() and the default value is 9.
Parameters
string value
Return Value
string Value expressed in basis units.
example
// Example: Convert FACT to PAGE (decimal: 9)
const value = "12.12345"; //FACT
const result = mitum.utils.parseUnits(value);
console.log(`FACT to PAGE: ${result}`); // "12123450000"
// output
FACT to PAGE: 12123450000Last updated