
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
number.prototype.toexponential
Advanced tools
An ES-spec-compliant Number.prototype.toExponential shim/polyfill/replacement that works as far down as ES3
An 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, Edge 15-18, and the equivalent versions of ChakraCore, have a rounding bug that this package fixes. If you are not concerned with supporting these engines, there is no need to use this package.
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
FAQs
An ES-spec-compliant Number.prototype.toExponential shim/polyfill/replacement that works as far down as ES3
The npm package number.prototype.toexponential receives a total of 7 weekly downloads. As such, number.prototype.toexponential popularity was classified as not popular.
We found that number.prototype.toexponential demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.