(matchPattern)
| 280 | } |
| 281 | |
| 282 | export function matchPattern2RegEx(matchPattern) { |
| 283 | return new RegExp( |
| 284 | `^${matchPattern2RegExString(matchPattern)}$` |
| 285 | ); |
| 286 | } |
| 287 | |
| 288 | export function matchPattern2RegExString(matchPattern) { |
| 289 | return matchPattern.replace(/\./g, '\\.').replace(/^\*\\\./, '(\\w+(-\\w+)*\\.)*'); |
no test coverage detected