MCPcopy Index your code
hub / github.com/darkreader/darkreader / isRegExpMatch

Function isRegExpMatch

src/utils/validation.ts:30–34  ·  view source on GitHub ↗
(regexp: RegExp)

Source from the content-addressed store, hash-verified

28}
29
30function isRegExpMatch(regexp: RegExp) {
31 return (x: any): x is string => {
32 return isString(x) && x.match(regexp) != null;
33 };
34}
35
36const isTime = isRegExpMatch(/^((0?[0-9])|(1[0-9])|(2[0-3])):([0-5][0-9])$/);
37function isNumber(x: any): x is number {

Callers 2

validation.tsFile · 0.85
validateThemeFunction · 0.85

Calls 1

isStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…