The number to convert
Optional
ignoreFraction: booleanWhether to ignore the fractional part of the number. Defaults to false.
Optional
returnInstance: TypeWhether to return a Big instance or BigObject. Defaults to true.
fromString("123.456"); // Big { value: 123456n, scale: 3 }
fromString("123.456", true); // Big { value: 123n, scale: 0 }
fromString("123.456", false, false); // { value: 123456n, scale: 3 }
fromString("1.5e3"); // Big { value: 1500n, scale: 0 }
Generated using TypeDoc
Convert a number or string to normal string number. Supports scientific notation.