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

Method _getParticleByPath

external/.scrollLibs.js:16250–16260  ·  view source on GitHub ↗
(cuePath)

Source from the content-addressed store, hash-verified

16248 )
16249 }
16250 _getParticleByPath(cuePath) {
16251 const edgeSymbol = this.edgeSymbol
16252 if (!cuePath.includes(edgeSymbol)) {
16253 const index = this.indexOfLast(cuePath)
16254 return index === -1 ? undefined : this._particleAt(index)
16255 }
16256 const parts = cuePath.split(edgeSymbol)
16257 const current = parts.shift()
16258 const currentParticle = this._getSubparticlesArray()[this._getCueIndex()[current]]
16259 return currentParticle ? currentParticle._getParticleByPath(parts.join(edgeSymbol)) : undefined
16260 }
16261 get next() {
16262 if (this.isRoot()) return this
16263 const index = this.index

Callers 2

getParticleMethod · 0.95
getMethod · 0.95

Calls 7

indexOfLastMethod · 0.95
_particleAtMethod · 0.95
_getSubparticlesArrayMethod · 0.95
_getCueIndexMethod · 0.95
splitMethod · 0.80
shiftMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected