number-to-decimal-form-string-x
Convert a base-10 or scientific E-notation value to a decimal form string.
module.exports(value)
⇒ string
⏏
This method converts a base-10 or scientific E-notation value to
a decimal form string. Javascript's IEE 754 double-precision numbers
give the same precision as number.toString()
.
Kind: Exported function
Returns: string
- The value converted to a decimal form string.
Throws:
TypeError
If value is not a valid format.TypeError
If value is a Symbol or not coercible.
Param | Type | Description |
---|---|---|
value | number | string |
The value to be converted. |
Example
; ; // '-9007199254740991'; // '-0' let number = 000000000001;number; // '1e-11'; // '0.00000000001' number = 8825949623451857;console; // '88259496234518.56';console; // '88259496234518.56' console; // '3.141592653589793'console; // '9007199254740991' console; // '0'console; // '0.00000000001'console; // '0.004062'console; // '446.1824' ; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError; // TypeError ; // TypeError; // TypeError