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

Method idToParticleMap

external/.scrollLibs.js:17951–17960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17949}
17950class ExtendibleParticle extends AbstractExtendibleParticle {
17951 get idToParticleMap() {
17952 if (!this.isRoot()) return this.root.idToParticleMap
17953 if (!this._particleMapCache) {
17954 this._particleMapCache = {}
17955 this.forEach(subparticle => {
17956 this._particleMapCache[subparticle.id] = subparticle
17957 })
17958 }
17959 return this._particleMapCache
17960 }
17961 get id() {
17962 return this.getAtom(0)
17963 }

Callers

nothing calls this directly

Calls 2

isRootMethod · 0.80
forEachMethod · 0.80

Tested by

no test coverage detected