package
Parse an exponential notation string into parts
npm install parse-exponentialGitHub-flavored package documentation.
Across all versions, last 30 days.
467,740 in 30 days
Runtime metadata.
Tagged topics.
Parse an exponential notation string into parts
$ npm install --save parse-exponentialvar parseExponential = require('parse-exponential')
(10).toExponential() // => '1e+1'
parseExponential('1e+1')
//=> ['1', '+1']parseExponential(exponential) -> array[coefficient, exponent]Parses an exponential into an a array of length 2 containing the coefficient and exponent.
Required
Type: string
An exponential notation string. Should follow the format returned by Number.prototype.toExponential.
MIT © Ben Drucker