MCPcopy Create free account
hub / github.com/Lemoncode/fonk / getRegExp

Function getRegExp

src/validators/pattern.ts:18–20  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

16const DEFAULT_PARAMS: PatternArgs = null;
17
18function getRegExp(pattern): RegExp {
19 return pattern instanceof RegExp ? pattern : new RegExp(pattern);
20}
21
22function parsePattern({ pattern }: PatternArgs): RegExp {
23 // Avoid RegExp like /true/ /false/ and /null/ without an explicit "true", "false" or "null"

Callers 1

parsePatternFunction · 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…