MCPcopy Create free account
hub / github.com/breck7/scroll / escapeRegExp

Method escapeRegExp

external/.scrollLibs.js:14150–14152  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

14148 .toLowerCase()
14149 }
14150 static escapeRegExp(str) {
14151 return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
14152 }
14153 static sum(arr) {
14154 return arr.reduce((curr, next) => curr + next, 0)
14155 }

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected