MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / escapeRegExp

Function escapeRegExp

scripts/glossary.js:56–58  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

54}
55
56function escapeRegExp(str) {
57 return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
58}

Callers 1

highlightTermsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected