parse-exponential
Parse an exponential notation string into parts
Install
$ npm install --save parse-exponential
Usage
var parseExponential = 10 // => '1e+1'//=> ['1', '+1']
API
parseExponential(exponential)
-> array[coefficient, exponent]
Parses an exponential into an a array of length 2 containing the coefficient and exponent.
exponential
Required
Type: string
An exponential notation string. Should follow the format returned by Number.prototype.toExponential
.
License
MIT © Ben Drucker