MCPcopy Index your code
hub / github.com/github/docs / matchesVersionString

Function matchesVersionString

lib/render-content/liquid.js:7–9  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

5// GHE versions are not valid SemVer, but can be coerced...
6// https://github.com/npm/node-semver#coercion
7function matchesVersionString(input) {
8 return typeof input === 'string' && input.match(/^(?:[a-z](?:[a-z-]*[a-z])?@)?\d+(?:\.\d+)*/)
9}
10// Support new version formats where version = plan@release
11// e.g., enterprise-server@2.21, where enterprise-server is the plan and 2.21 is the release
12// e.g., free-pro-team@latest, where free-pro-team is the plan and latest is the release

Callers 1

liquid.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected