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

Method _textToContentAndSubparticlesTuple

external/.scrollLibs.js:16523–16533  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

16521 return SUBPARTICLE_MEMBRANE
16522 }
16523 _textToContentAndSubparticlesTuple(text) {
16524 const lines = text.split(this.particleBreakSymbolRegex)
16525 const firstLine = lines.shift()
16526 const subparticles = !lines.length
16527 ? undefined
16528 : lines
16529 .map(line => (line.substr(0, 1) === this.edgeSymbol ? line : this.edgeSymbol + line))
16530 .map(line => line.substr(1))
16531 .join(this.particleBreakSymbol)
16532 return [firstLine, subparticles]
16533 }
16534 _getLine() {
16535 return this._line
16536 }

Callers 2

setFromTextMethod · 0.95

Calls 4

splitMethod · 0.80
shiftMethod · 0.80
mapMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected