function (version, newVersion, newCodeName, versionOnly = false) {
  let matches = [`lts/${newCodeName}`, newCodeName, newVersion] // eslint-disable-line
  const tags = ['node', 'stable', 'lts/\\*']
  if (!versionOnly) {
    matches = matches.concat(tags)
  }
  const overallResult = !!matches.find((match) => {
    // first regex matches in array form ('- 10'), second regex matches the inline form ('10')
    return !!(version.match(RegExp(`([^.])(${match})`, 'i')) || version.match(RegExp(`^${match}`, 'i')))
  })
  return overallResult
}