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

Method addRuntimeFact

src/almanac.js:123–127  ·  view source on GitHub ↗

* Adds a constant fact during runtime. Can be used mid-run() to add additional information * @deprecated use addFact * @param {String} fact - fact identifier * @param {Mixed} value - constant value of the fact

(factId, value)

Source from the content-addressed store, hash-verified

121 * @param {Mixed} value - constant value of the fact
122 */
123 addRuntimeFact (factId, value) {
124 debug(`almanac::addRuntimeFact id:${factId}`)
125 const fact = new Fact(factId, value)
126 return this._addConstantFact(fact)
127 }
128
129 /**
130 * Returns the value of a fact, based on the given parameters. Utilizes the 'almanac' maintained

Callers 5

index.test-d.tsFile · 0.80
engine-run.test.jsFile · 0.80
almanac.test.jsFile · 0.80
setupFunction · 0.80

Calls 2

_addConstantFactMethod · 0.95
debugFunction · 0.85

Tested by

no test coverage detected