4 lines
105 B
TypeScript
4 lines
105 B
TypeScript
|
export const escapeRegExp = (str: string) => {
|
||
|
return str.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||
|
};
|