MCPcopy Create free account
hub / github.com/arktypeio/arktype / regexFacts

Function regexFacts

ark/type/deferred.ts:567–570  ·  view source on GitHub ↗
(v: RegExp)

Source from the content-addressed store, hash-verified

565
566// a subclass says what it likes of its source and flags, or throws
567const regexFacts = (v: RegExp): Facts | undefined =>
568 Object.getPrototypeOf(v) === RegExp.prototype ?
569 patternFacts(v.source, v.flags)
570 : undefined
571
572// a string's, whose source is what's written but for a / it escapes, which
573// isn't the source of a RegExp writing that escape

Callers 3

valueFactsFunction · 0.85
deferred.tsFile · 0.85
deferDefinitionFunction · 0.85

Calls 1

patternFactsFunction · 0.85

Tested by

no test coverage detected