Package Exports
- @extra-number/significant-digits
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@extra-number/significant-digits) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Count the number of significant digits of a number.
Based on the solution provided by @Jos de Jong.
const significantDigits = require('@extra-number/significant-digits');
// significantDigits(<number>)
significantDigits(0.0034);
// 2
significantDigits(120.5e50);
// 4
significantDigits(120.5e-50);
// 4