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

Method getValue

src/almanac.js:181–186  ·  view source on GitHub ↗

* Interprets value as either a primitive, or if a fact, retrieves the fact value

(value)

Source from the content-addressed store, hash-verified

179 * Interprets value as either a primitive, or if a fact, retrieves the fact value
180 */
181 getValue (value) {
182 if (isObjectLike(value) && Object.prototype.hasOwnProperty.call(value, 'fact')) { // value = { fact: 'xyz' }
183 return this.factValue(value.fact, value.params, value.path)
184 }
185 return Promise.resolve(value)
186 }
187}

Callers 2

evaluateMethod · 0.80
resolveEventParamsMethod · 0.80

Calls 1

factValueMethod · 0.95

Tested by

no test coverage detected