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

Method particleAt

external/.scrollLibs.js:15983–15990  ·  view source on GitHub ↗
(indexOrIndexArray)

Source from the content-addressed store, hash-verified

15981 return this._getSubparticlesArray()[index]
15982 }
15983 particleAt(indexOrIndexArray) {
15984 if (typeof indexOrIndexArray === "number") return this._particleAt(indexOrIndexArray)
15985 if (indexOrIndexArray.length === 1) return this._particleAt(indexOrIndexArray[0])
15986 const first = indexOrIndexArray[0]
15987 const particle = this._particleAt(first)
15988 if (!particle) return undefined
15989 return particle.particleAt(indexOrIndexArray.slice(1))
15990 }
15991 // Flatten a particle into an object like {twitter:"pldb", "twitter.followers":123}.
15992 // Assumes you have a nested key/value list with no multiline strings.
15993 toFlatObject(delimiter = ".") {

Callers 8

getFirstParticleMethod · 0.95
pickMethod · 0.95
pasteTextMethod · 0.95
pathVectorToCuePathMethod · 0.80
parserMethod · 0.80
_inferParserDefMethod · 0.80
constructorMethod · 0.80

Calls 2

_particleAtMethod · 0.95
sliceMethod · 0.80

Tested by

no test coverage detected