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

Method _createParticle

external/.scrollLibs.js:15238–15248  ·  view source on GitHub ↗
(parentParticle, block, index)

Source from the content-addressed store, hash-verified

15236 } else return this._createParticle(parentParticle, block, index)
15237 }
15238 _createParticle(parentParticle, block, index) {
15239 index = index === undefined ? parentParticle.length : index
15240 const parser = this._getMatchingParser(block, parentParticle, index)
15241 const { particleBreakSymbol } = parentParticle
15242 const lines = block.split(particleBreakSymbol)
15243 const subparticles = lines
15244 .slice(1)
15245 .map(line => line.substr(1))
15246 .join(particleBreakSymbol)
15247 return new parser(subparticles, lines[0], parentParticle, index)
15248 }
15249}
15250class Particle extends AbstractParticle {
15251 constructor(subparticles, line, parent, index) {

Callers 1

createParticleMethod · 0.95

Calls 5

_getMatchingParserMethod · 0.95
splitMethod · 0.80
mapMethod · 0.80
sliceMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected