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

Method _insertBlock

external/.scrollLibs.js:16601–16607  ·  view source on GitHub ↗
(block, index)

Source from the content-addressed store, hash-verified

16599 this._insertBlock(this._makeBlock(line, subparticles))
16600 }
16601 _insertBlock(block, index) {
16602 if (index !== undefined) index = index < 0 ? this.length + index : index
16603 const newParticle = this._getParserPool().createParticle(this, block, index)
16604 if (this._cueIndex) this._makeCueIndex(index)
16605 this.clearQuickCache()
16606 return newParticle
16607 }
16608 _insertLines(lines, index = this.length) {
16609 const parser = this.constructor
16610 const newParticle = new parser()

Callers 11

_setSubparticlesMethod · 0.95
appendLineMethod · 0.95
concatMethod · 0.95
insertLineMethod · 0.95
insertSectionMethod · 0.95
copyToMethod · 0.80
duplicateMethod · 0.80
replaceWithMethod · 0.80

Calls 4

_getParserPoolMethod · 0.95
_makeCueIndexMethod · 0.95
clearQuickCacheMethod · 0.95
createParticleMethod · 0.80

Tested by

no test coverage detected