MCPcopy Create free account
hub / github.com/witheve/Eve / check

Method check

src/runtime/block.ts:108–133  ·  view source on GitHub ↗
(multiIndex: MultiIndex, change, tags, e, a, v)

Source from the content-addressed store, hash-verified

106 }
107
108 check(multiIndex: MultiIndex, change, tags, e, a, v) {
109 //multidb
110 if(this.alwaysTrue) return true;
111 let deps = this.dependencies;
112 if(tags.length === 0) {
113 let attrIndex = deps["any"];
114 if(!attrIndex) return false;
115 let attr = attrIndex[a];
116 if(attr === true) return true;
117 if(attr === undefined) return false;
118 return attr[v];
119 }
120 if(deps["any"]) {
121 let attr = deps["any"][a];
122 if(attr === true) return true;
123 if(attr && attr[v] === true) return true
124 }
125 for(let tag of tags) {
126 let attrIndex = deps[tag];
127 if(!attrIndex) continue;
128 let attr = attrIndex[a];
129 if(attr === undefined) continue;
130 if(attr === true || attr[v] === true) return true;
131 }
132 return false
133 }
134}
135
136//---------------------------------------------------------------------

Callers 1

blocksFromCommitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected