MCPcopy Create free account
hub / github.com/breck7/scroll / parserIdIndex

Method parserIdIndex

external/.scrollLibs.js:18135–18146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18133 return !!this.parserIdIndex[parserId]
18134 }
18135 get parserIdIndex() {
18136 if (this._parserIdIndex) return this._parserIdIndex
18137 const index = {}
18138 this._parserIdIndex = index
18139 for (let particle of this.getTopDownArrayIterator()) {
18140 Array.from(particle.definition._getAncestorSet()).forEach(id => {
18141 if (!index[id]) index[id] = []
18142 index[id].push(particle)
18143 })
18144 }
18145 return index
18146 }
18147 get particleIndex() {
18148 // StringMap<int> {cue: index}
18149 // When there are multiple tails with the same cue, index stores the last content.

Callers

nothing calls this directly

Calls 4

forEachMethod · 0.80
_getAncestorSetMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected