(id: string | RegExp)
| 27 | const resolutionBase = options && options.resolve; |
| 28 | |
| 29 | const getMatcher = (id: string | RegExp) => |
| 30 | id instanceof RegExp |
| 31 | ? id |
| 32 | : { |
| 33 | test: (what: string) => { |
| 34 | // this refactor is a tad overly verbose but makes for easy debugging |
| 35 | const pattern = getMatcherString(id, resolutionBase); |
| 36 | const fn = pm(pattern, { dot: true }); |
| 37 | const result = fn(what); |
| 38 | |
| 39 | return result; |
| 40 | } |
| 41 | }; |
| 42 | |
| 43 | const includeMatchers = ensureArray(include).map(getMatcher); |
| 44 | const excludeMatchers = ensureArray(exclude).map(getMatcher); |
nothing calls this directly
no test coverage detected