pretty-exponential

Number.prototype.toExponential made beautiful.

pretty-exponential

Number.prototype.toExponential made beautiful: -1.243e+21-1.243×10²¹

Download manually or with a package manager.

npm

npm install pretty-exponential

Bower

bower install pretty-exponential

Component

component install bmcustodio/pretty-exponential
var prettyExponential = require('pretty-exponential');
<script src="bower_components/pretty-exponential/dist/pretty-exponential.min.js"></script>
<script src="components/bmcustodio-pretty-exponential/dist/pretty-exponential.min.js"></script>
prettyExponential(0.031245); //=> '3.1245×10⁻²' 
prettyExponential(0.031245, 3); //=> '3.124×10⁻²' 

MIT © Bruno M. Custódio