MCPcopy
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
287function isRegex(value: unknown): value is RegExp {
288 try {
289 regExpTest(value as RegExp, '');
290 return true;
291 } catch {
292 return false;
293 }
294}
295
296export {
297 // Array

Callers 1

_parseConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…