MCPcopy
hub / github.com/mailvelope/mailvelope / matchPattern2RegExString

Function matchPattern2RegExString

src/lib/util.js:288–290  ·  view source on GitHub ↗
(matchPattern)

Source from the content-addressed store, hash-verified

286}
287
288export function matchPattern2RegExString(matchPattern) {
289 return matchPattern.replace(/\./g, '\\.').replace(/^\*\\\./, '(\\w+(-\\w+)*\\.)*');
290}
291
292export function mapError(error = {}) {
293 return {

Callers 4

initScriptInjectionFunction · 0.90
initAuthRequestApiFunction · 0.90
verifyHostFunction · 0.90
matchPattern2RegExFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected