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

Method getCustomIndex

external/.scrollLibs.js:16844–16856  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

16842 return this._quickCache
16843 }
16844 getCustomIndex(key) {
16845 if (!this.quickCache.customIndexes) this.quickCache.customIndexes = {}
16846 const customIndexes = this.quickCache.customIndexes
16847 if (customIndexes[key]) return customIndexes[key]
16848 const customIndex = {}
16849 customIndexes[key] = customIndex
16850 this.filter(file => file.has(key)).forEach(file => {
16851 const value = file.get(key)
16852 if (!customIndex[value]) customIndex[value] = []
16853 customIndex[value].push(file)
16854 })
16855 return customIndex
16856 }
16857 clearQuickCache() {
16858 delete this._quickCache
16859 }

Callers

nothing calls this directly

Calls 4

filterMethod · 0.95
forEachMethod · 0.80
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected