MCPcopy Create free account
hub / github.com/Justineo/github-hovercard / escapeRegExp

Function escapeRegExp

extensions/edge/mustache.js:36–38  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

34 }
35
36 function escapeRegExp (string) {
37 return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
38 }
39
40 /**
41 * Null safe way of checking whether or not an object,

Callers 1

compileTagsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected