UNPKG

@quasar/app-vite

Version:

Quasar Framework App CLI with Vite

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