MCPcopy Create free account
hub / github.com/callstack/react-native-paper / createUrlForVersion

Function createUrlForVersion

docs/public/4.0/scripts/version.js:5–13  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

3'use strict';
4
5function createUrlForVersion(version) {
6 const url = window.location.pathname;
7 const versionRegex = /(\d+)(.\d+)/;
8
9 if (url.match(versionRegex)) {
10 return url.replace(/(\d+)(.\d+)/, `${version}`);
11 }
12 return url.replace(/react-native-paper\//, `react-native-paper/${version}/`);
13}
14
15function appendVersionBanner() {
16 const html = `

Callers 1

appendVersionBannerFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…