function version(version) {
  if (typeof version !== 'string' && typeof version !== 'number') {
    throw new Error(`Can't generate a version color for ${version}`)
  }
  version = `${version}`
  let first = version[0]
  if (first === 'v') {
    first = version[1]
  }
  if (
    first === '0' ||
    /alpha|beta|snapshot|dev|pre|rc|scm|cvs/i.test(version)
  ) {
    return 'orange'
  } else {
    return 'blue'
  }
}
Determines the color used for a badge based on version.

@param {string|number} version Version used for determining badge color
@returns {string} Badge color