Function: toPatternMatcher()
toPatternMatcher(
patterns,options?):Predicate<string>
Compile patterns into a single OR’d Predicate. Accepts the raw config shapes parseList does - an array, or one comma/whitespace-separated string - so a field and its env var need no separate handling.
With no usable patterns the result always returns false.
Parameters
Section titled “Parameters”patterns
Section titled “patterns”string | readonly string[] | null | undefined
options?
Section titled “options?”PatternOptions = {}
Returns
Section titled “Returns”Predicate<string>
Example
Section titled “Example”const forwardable = toPatternMatcher(process.env.TUNNEL_FORWARD_HEADERS);