MCPcopy
hub / github.com/CacheControl/json-rules-engine / removeOperator

Method removeOperator

src/engine.js:145–154  ·  view source on GitHub ↗

* Remove a custom operator definition * @param {string} operatorOrName - operator identifier within the condition; i.e. instead of 'equals', 'greaterThan', etc * @param {function(factValue, jsonValue)} callback - the method to execute when the operator is encountered.

(operatorOrName)

Source from the content-addressed store, hash-verified

143 * @param {function(factValue, jsonValue)} callback - the method to execute when the operator is encountered.
144 */
145 removeOperator (operatorOrName) {
146 let operatorName
147 if (operatorOrName instanceof Operator) {
148 operatorName = operatorOrName.name
149 } else {
150 operatorName = operatorOrName
151 }
152
153 return this.operators.delete(operatorName)
154 }
155
156 /**
157 * Add a fact definition to the engine. Facts are called by rules as they are evaluated.

Callers 2

index.test-d.tsFile · 0.80
engine.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected