Package Exports
- @theoryofnekomata/normalize-exponential
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 (@theoryofnekomata/normalize-exponential) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
normalize-exponential
Normalizes exponential format in float-parseable strings.
Why?
If, for example, you want to work on floating point values without needing to parse it (as it loses the precision), and you want to be able to represent your values into an exponential notation, you'll need something like this package.
Installation
Via NPM:
$ npm install --save @theoryofnekomata/normalize-exponentialUsage
var normalizeExp = require('@theoryofnekomata/normalize-exponential');
var floatStr = '00003453.654345000e+34',
normalizedFloat = normalizeExp(floatStr); // returns 3.453654345e+37
// ...Notes
It enforces the output to be in lowercase (i.e. 'e' instead of 'E').
Contribution
Sure thing! Just clone the repo.
to-sass-value uses Jasmine for unit tests, and
ESLint to make sure code is written consistently (and implied it will
run consistently as well).
- Run
npm installupon initial clone. - Run
npm testand make sure all the tests pass and properly written. - Run
npm run lintto ensure consistency of your code (make sure to install ESLint first). - Create PRs so that I can confirm and merge your contributions.
Please star the repo if you find it useful in your projects.
License
MIT. See LICENSE file for details.