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

Method pick

external/.scrollLibs.js:16224–16231  ·  view source on GitHub ↗
(fields)

Source from the content-addressed store, hash-verified

16222 return ""
16223 }
16224 pick(fields) {
16225 const newParticle = new Particle(this.toString()) // todo: why not clone?
16226 const map = Utils.arrayToMap(fields)
16227 newParticle.particleAt(0).forEach(particle => {
16228 if (!map[particle.getAtom(0)]) particle.destroy()
16229 })
16230 return newParticle
16231 }
16232 getParticlesByGlobPath(query) {
16233 return this._getParticlesByGlobPath(query)
16234 }

Callers 2

.scrollLibs.jsFile · 0.80
WidgetFunction · 0.80

Calls 6

toStringMethod · 0.95
particleAtMethod · 0.95
arrayToMapMethod · 0.80
forEachMethod · 0.80
destroyMethod · 0.80
getAtomMethod · 0.45

Tested by

no test coverage detected