MCPcopy Index your code
hub / github.com/CacheControl/json-rules-engine / removeFact

Method removeFact

src/engine.js:180–189  ·  view source on GitHub ↗

* Remove a fact definition to the engine. Facts are called by rules as they are evaluated. * @param {object|Fact} id - fact identifier or instance of Fact

(factOrId)

Source from the content-addressed store, hash-verified

178 * @param {object|Fact} id - fact identifier or instance of Fact
179 */
180 removeFact (factOrId) {
181 let factId
182 if (!(factOrId instanceof Fact)) {
183 factId = factOrId
184 } else {
185 factId = factOrId.id
186 }
187
188 return this.facts.delete(factId)
189 }
190
191 /**
192 * Iterates over the engine rules, organizing them by highest -> lowest priority

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected