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

Method previous

external/.scrollLibs.js:16269–16276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16267 return next === length ? parent._getSubparticlesArray()[0] : parent._getSubparticlesArray()[next]
16268 }
16269 get previous() {
16270 if (this.isRoot()) return this
16271 const index = this.index
16272 const parent = this.parent
16273 const length = parent.length
16274 const prev = index - 1
16275 return prev === -1 ? parent._getSubparticlesArray()[length - 1] : parent._getSubparticlesArray()[prev]
16276 }
16277 _getUnionNames() {
16278 if (!this.length) return []
16279 const obj = {}

Callers

nothing calls this directly

Calls 2

isRootMethod · 0.95
_getSubparticlesArrayMethod · 0.80

Tested by

no test coverage detected