0.1.4 • Published 6 years ago
number-toscientific v0.1.4
number-toscientific
NOTE: number-toscientific was renamed to @extra-number/to-scientific.
Convert number to scientific notation.
const toScientific = require('number-toscientific');
// toScientific(<number>)
toScientific(695700000);
// '6.957×10⁸' (radius of Sun in m)
toScientific(3390000);
// '3.3899999999999997×10⁶' (radius of Earth in m)
toScientific(0.000000000053);
// '5.3×10⁻¹¹' (radius of Hydrogen atom)