ms$1 = function (val, options) {
    options = options || {};
    var type = typeof val;
    if (type === 'string' && val.length > 0) {
      return parse$1(val);
    } else if (type === 'number' && isFinite(val)) {
      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