UNPKG

@quasar/app-webpack

Version:

Quasar Framework App CLI with Webpack

10 lines (9 loc) 223 B
/** * Escape a string to then be supplied * to new RegExp() */ module.exports.escapeRegexString = function escapeRegexString (str) { return str .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') .replace(/-/g, '\\x2d') }