$ npm install number.prototype.toexponentialAn ES-spec-compliant Number.prototype.toExponential shim/polyfill/replacement that works as far down as ES3
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.
In particular:
If you are not concerned with supporting these engines, there is no need to use this package.
Note: ES2018 increased the maximum range from 20 to 100. This package does not attempt to patch this difference.
npm install --save number.prototype.exponential
console.log((-3).toExponential()); // "-3e+0"
console.log(0x10.toExponential(2)); // "1.60e+1"
console.log(1.23456.toExponential(5)); // "1.23456e+0"
console.log((-6.9e-11).toExponential(4)); // "-6.9000e-11"
Clone the repo, npm install, and run npm test