index.js
function scino (num, precision, options) {
  if (typeof precision === 'object') {
    options = precision
    precision = undefined
  }

  if (typeof num !== 'number') {
    return num
  }

  var parsed = parse(num, precision)
  var opts = getValidOptions(options)
  var coefficient = parsed.coefficient
  var exponent = parsed.exponent.toString()
  var superscriptExponent = ''

  if (typeof coefficient === 'number' && isNaN(coefficient)) {
    return num
  }

  for (var i = 0; i < exponent.length; i++) {
    superscriptExponent += SUPERSCRIPTS[exponent[i]]
  }

  return opts.beforeCoefficient + coefficient + opts.afterCoefficient +
    opts.beforeMultiplicationSign + opts.multiplicationSign + opts.afterMultiplicationSign +
    opts.beforeBase + opts.base + opts.afterBase +
    opts.beforeExponent + superscriptExponent + opts.afterExponent
}
function scino (num, precision, options) {
  if (typeof precision === 'object') {
    options = precision
    precision = undefined
  }

  if (typeof num !== 'number') {
    return num
  }

  var parsed = parse(num, precision)
  var opts = getValidOptions(options)
  var coefficient = parsed.coefficient
  var exponent = parsed.exponent.toString()
  var superscriptExponent = ''

  if (typeof coefficient === 'number' && isNaN(coefficient)) {
    return num
  }

  for (var i = 0; i < exponent.length; i++) {
    superscriptExponent += SUPERSCRIPTS[exponent[i]]
  }

  return opts.beforeCoefficient + coefficient + opts.afterCoefficient +
    opts.beforeMultiplicationSign + opts.multiplicationSign + opts.afterMultiplicationSign +
    opts.beforeBase + opts.base + opts.afterBase +
    opts.beforeExponent + superscriptExponent + opts.afterExponent
}
function scino ( num , precision , options ) { if ( typeof precision === 'object' ) { options = precision precision = undefined } if ( typeof num !== 'number' ) { return num } var parsed = parse ( num , precision ) var opts = getValidOptions ( options ) var coefficient = parsed . coefficient var exponent = parsed . exponent . toString ( ) var superscriptExponent = '' if ( typeof coefficient === 'number' && isNaN ( coefficient ) ) { return num } for ( var i = 0 ; i < exponent . length ; i ++ ) { superscriptExponent += SUPERSCRIPTS [ exponent [ i ] ] } return opts . beforeCoefficient + coefficient + opts . afterCoefficient + opts . beforeMultiplicationSign + opts . multiplicationSign + opts . afterMultiplicationSign + opts . beforeBase + opts . base + opts . afterBase + opts . beforeExponent + superscriptExponent + opts . afterExponent }
Format a number using scientific notation.

@param {number} num
@param {number} [precision]
@param {Object} [options] Formatting options
@returns {string} Formatted number
Format a number using scientific notation .