MCPcopy Index your code
hub / github.com/dataease/SQLBot / addRule

Method addRule

frontend/public/swagger-ui-bundle.js:20546–20554  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

20544 (this.position = 0))
20545 }
20546 addRule(s, o) {
20547 ;((o.position = this.position++),
20548 (this.matchIndexes[this.matchAt] = o),
20549 this.regexes.push([o, s]),
20550 (this.matchAt +=
20551 (function countMatchGroups(s) {
20552 return new RegExp(s.toString() + '|').exec('').length - 1
20553 })(s) + 1))
20554 }
20555 compile() {
20556 0 === this.regexes.length && (this.exec = () => null)
20557 const s = this.regexes.map((s) => s[1])

Callers 1

getMatcherMethod · 0.95

Calls 3

pushMethod · 0.45
execMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected