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

Function normalizeVersion

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

Source from the content-addressed store, hash-verified

5import { $ } from 'bun';
6
7function normalizeVersion(version: string): string {
8 return version.trim().replace(/^refs\/tags\//, '').replace(/^v/, '');
9}
10
11const SEMVER_REGEX = /^\d+\.\d+\.\d+(-.+)?$/;
12

Callers 2

getVersionFromGitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected