index.js
function parse (num, precision) {
  var exponent = Math.floor(Math.log10(Math.abs(num)))
  var coefficient = new Decimal(num)
    .mul(new Decimal(Math.pow(10, -1 * exponent)))

  return {
    coefficient: typeof precision === 'number'
      ? coefficient.toSD(precision).toNumber()
      : coefficient.toNumber(),
    exponent: exponent
  }
}
function parse (num, precision) {
  var exponent = Math.floor(Math.log10(Math.abs(num)))
  var coefficient = new Decimal(num)
    .mul(new Decimal(Math.pow(10, -1 * exponent)))

  return {
    coefficient: typeof precision === 'number'
      ? coefficient.toSD(precision).toNumber()
      : coefficient.toNumber(),
    exponent: exponent
  }
}
function parse ( num , precision ) { var exponent = Math . floor ( Math . log10 ( Math . abs ( num ) ) ) var coefficient = new Decimal ( num ) . mul ( new Decimal ( Math . pow ( 10 , - 1 * exponent ) ) ) return { coefficient : typeof precision === 'number' ? coefficient . toSD ( precision ) . toNumber ( ) : coefficient . toNumber ( ) , exponent : exponent } }
Parse a number into its base and exponent.

{@link http://mikemcl.github.io/decimal.js/#toSD}

@param {number} num
@param {number} [precision]
@returns {Object}
@property {number} coefficient
@property {number} exponent
Parse a number into its base and exponent .