dist/index.js
function (val, options) {
  options = options || {};
  var type = typeof val;
  if (type === 'string' && val.length > 0) {
    return parse$2(val)
  } else if (type === 'number' && isNaN(val) === false) {
    return options.long ?
			fmtLong$1(val) :
			fmtShort$1(val)
  }
  throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
}
function (val, options) {
  options = options || {};
  var type = typeof val;
  if (type === 'string' && val.length > 0) {
    return parse$2(val)
  } else if (type === 'number' && isNaN(val) === false) {
    return options.long ?
			fmtLong$1(val) :
			fmtShort$1(val)
  }
  throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
}
Parse or format the given `val`.

Options:

- `long` verbose formatting [false]

@param {String|Number} val
@param {Object} options
@throws {Error} throw an error if val is not a non-empty string or a number
@return {String|Number}
@api public