MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / isValidSemver

Function isValidSemver

scripts/prepublish.ts:13–15  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

11const SEMVER_REGEX = /^\d+\.\d+\.\d+(-.+)?$/;
12
13function isValidSemver(version: string): boolean {
14 return SEMVER_REGEX.test(version);
15}
16
17function getVersionFromEnvironment(): string | null {
18 const candidates = [

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected