UNPKG

madrun

Version:

CLI tool to run multiple npm-scripts in a madly comfortable way

11 lines (8 loc) 198 B
'use strict'; module.exports = (str) => { const wildcard = `^${str .replace('.', '\\.') .replace('*', '.*') .replace('?', '.?')}$`; return RegExp(wildcard); };