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

Method limit

external/.scrollLibs.js:15926–15934  ·  view source on GitHub ↗
(quantity, offset = 0)

Source from the content-addressed store, hash-verified

15924 }
15925 // todo: preserve subclasses!
15926 limit(quantity, offset = 0) {
15927 const result = new Particle()
15928 this.getSubparticles()
15929 .slice(offset, quantity + offset)
15930 .forEach(particle => {
15931 result.appendParticle(particle)
15932 })
15933 return result
15934 }
15935 getSubparticlesFirstArray() {
15936 const arr = []
15937 this._getSubparticlesFirstArray(arr)

Callers 2

firstMethod · 0.95
lastMethod · 0.95

Calls 4

getSubparticlesMethod · 0.95
appendParticleMethod · 0.95
forEachMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected