UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

5 lines (4 loc) 130 B
const regexpCharsReg = /[\\^$.*+?()[\]{}|]/g; export function escapeRegExp(str) { return str.replace(regexpCharsReg, "\\$&"); }