Function: toPattern()
toPattern(
pattern,options?):Predicate<string,string> |undefined
Compile ONE pattern into a predicate, or undefined when the entry is empty
or an unparseable regex literal.
Callers that want a whole list should use toPatternMatcher; this is exported for the case where a consumer applies its own semantics to some shapes and only wants the glob/regex handling (the email gate’s bare-domain shortcut, for one).
Parameters
Section titled “Parameters”pattern
Section titled “pattern”string
options?
Section titled “options?”PatternOptions = {}
Returns
Section titled “Returns”Predicate<string, string> | undefined