UNPKG

@quasar/app-webpack

Version:

Quasar Framework App CLI with Webpack

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