Math.log10
An ESnext spec-compliant Math.log10
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.
Getting started
npm install --save math.log10
Usage/Examples
console.log(Math.log10(2)); // 0.3010299956639812
console.log(Math.log10(1)); // 0
console.log(Math.log10(0)); // -Infinity
console.log(Math.log10(-2)); // NaN
console.log(Math.log10(100000)); // 5
Tests
Simply clone the repo, npm install
, and run npm test