UNPKG

@feugene/mu

Version:

Helpful TS utilities without dependencies

5 lines (4 loc) 157 B
export default function pregQuote(string: string) { // Quote regular expression characters return string.replace(/([!$()*+.:<=>?[\\\]^{|}])/g, '\\$1') }