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

Method getFiltered

external/.scrollLibs.js:16176–16184  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

16174 return this.map(particle => particle.get(path))
16175 }
16176 getFiltered(fn) {
16177 const clone = this.clone()
16178 clone
16179 .filter((particle, index) => !fn(particle, index))
16180 .forEach(particle => {
16181 particle.destroy()
16182 })
16183 return clone
16184 }
16185 getParticle(cuePath) {
16186 return this._getParticleByPath(cuePath)
16187 }

Callers

nothing calls this directly

Calls 5

cloneMethod · 0.95
fnFunction · 0.85
forEachMethod · 0.80
destroyMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected