function stripVersion (version) {
  const match = version.match(/(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)/)
  if (match) {
    return match[0]
  }
  /* c8 ignore next */
  return version
}
Strip all extra characters from a simple semver version string
@param {string} version
@returns string