(matcherOrMatchers: unknown)
| 94 | `.trim(); |
| 95 | |
| 96 | export function getRegExpFromMatchers(matcherOrMatchers: unknown): string { |
| 97 | if (!matcherOrMatchers) { |
| 98 | return '^/.*$'; |
| 99 | } |
| 100 | const matchers = Array.isArray(matcherOrMatchers) |
| 101 | ? matcherOrMatchers |
| 102 | : [matcherOrMatchers]; |
| 103 | const regExps = matchers.flatMap(getRegExpFromMatcher).join('|'); |
| 104 | return regExps; |
| 105 | } |
| 106 | |
| 107 | function getRegExpFromMatcher( |
| 108 | matcher: unknown, |
no test coverage detected