Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

4 lines
142 B
JavaScript
Raw Normal View History

export default function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
}