UNPKG

ice.fo.utils

Version:

4 lines (3 loc) • 105 B
export default function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); }