MCPcopy
hub / github.com/vercel/next.js / normalizeRegEx

Function normalizeRegEx

test/lib/next-test-utils.ts:1276–1278  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

1274}
1275
1276export function normalizeRegEx(src: string) {
1277 return new RegExp(src).source.replace(/\^\//g, '^\\/')
1278}
1279
1280function readJson(path: string) {
1281 return JSON.parse(readFileSync(path, 'utf-8'))

Callers 8

runTestsFunction · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
runTestsFunction · 0.90
index.test.tsFile · 0.90
app-static.test.tsFile · 0.90
expectedManifestRoutesFunction · 0.90
runTestsFunction · 0.90

Calls 1

replaceMethod · 0.65

Tested by 5

runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
expectedManifestRoutesFunction · 0.72
runTestsFunction · 0.72