index.js
function cast(values, name) {
  var value = values && typeof values === 'string' ? [values] : values

  if (!value || typeof value !== 'object' || !('length' in value)) {
    throw new Error(
      'Invalid ' + name + ' `' + value + '`, expected non-empty string'
    )
  }

  return value
}
function cast(values, name) {
  var value = values && typeof values === 'string' ? [values] : values

  if (!value || typeof value !== 'object' || !('length' in value)) {
    throw new Error(
      'Invalid ' + name + ' `' + value + '`, expected non-empty string'
    )
  }

  return value
}
function cast ( values , name ) { var value = values && typeof values === 'string' ? [ values ] : values if ( ! value || typeof value !== 'object' || ! ( 'length' in value ) ) { throw new Error ( 'Invalid ' + name + ' `' + value + '`, expected non-empty string' ) } return value }
Validate tags or ranges, and cast them to arrays.
Validate tags or ranges and cast them to arrays .