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

Method factValue

examples/12-using-custom-almanac.js:19–34  ·  view source on GitHub ↗
(factId, params, path)

Source from the content-addressed store, hash-verified

17 }
18
19 factValue (factId, params, path) {
20 let pipes = []
21 if (params && 'pipes' in params && Array.isArray(params.pipes)) {
22 pipes = params.pipes
23 delete params.pipes
24 }
25 return super.factValue(factId, params, path).then(value => {
26 return pipes.reduce((value, pipeName) => {
27 const pipe = this.pipes.get(pipeName)
28 if (pipe) {
29 return pipe(value)
30 }
31 return value
32 }, value)
33 })
34 }
35}
36
37async function start () {

Callers 8

startFunction · 0.95
startFunction · 0.45
startFunction · 0.45
startFunction · 0.45
startFunction · 0.45
startFunction · 0.45
startFunction · 0.45
startFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected