Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cure53/DOMPurify
/ isRegex
Function
isRegex
src/utils.ts:287–294 ·
view source on GitHub ↗
(value: unknown)
Source
from the content-addressed store, hash-verified
285
}
286
287
function
isRegex(value: unknown): value is RegExp {
288
try {
289
regExpTest(value as RegExp,
''
);
290
return
true;
291
} catch {
292
return
false;
293
}
294
}
295
296
export
{
297
// Array
Callers
1
_parseConfig
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected