MCPcopy
hub / github.com/darkreader/darkreader / isRegExp

Function isRegExp

src/utils/url.ts:280–282  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

278}
279
280function isRegExp(pattern: string) {
281 return pattern.startsWith('/') && pattern.endsWith('/') && pattern.length > 2;
282}
283
284const REGEXP_CACHE_SIZE = 1024;
285const createRegExp = cachedFactory((pattern: string) => {

Callers 2

isURLMatchedFunction · 0.85
indexURLTemplateListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected