MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / _escapeRegExp

Function _escapeRegExp

docs/_static/searchtools.js:57–58  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

55 * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
56 */
57const _escapeRegExp = (string) =>
58 string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
59
60const _displayItem = (item, searchTerms) => {
61 const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;

Callers 1

searchtools.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected