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

Method split

external/.scrollLibs.js:16481–16490  ·  view source on GitHub ↗
(cue)

Source from the content-addressed store, hash-verified

16479 // Note: Splits using a positive lookahead
16480 // this.split("foo").join("\n") === this.toString()
16481 split(cue) {
16482 // todo: cleanup
16483 const constructor = this._modifiedConstructor || this.constructor
16484 const ParticleBreakSymbol = this.particleBreakSymbol
16485 const AtomBreakSymbol = this.atomBreakSymbol
16486 // todo: cleanup. the escaping is wierd.
16487 return this.toString()
16488 .split(new RegExp(`\\${ParticleBreakSymbol}(?=${cue}(?:${AtomBreakSymbol}|\\${ParticleBreakSymbol}))`, "g"))
16489 .map(str => new constructor(str))
16490 }
16491 get asMarkdownTable() {
16492 return this.toMarkdownTableAdvanced(this._getUnionNames(), val => val)
16493 }

Callers 15

importParsers.jsFile · 0.80
importCommandMethod · 0.80
buildFilesMethod · 0.80
parseCSVFunction · 0.80
updateParserFilesFunction · 0.80
cloneMethod · 0.80
convertToScrollsetFunction · 0.80
.katex.min.jsFile · 0.80
replaceAllMethod · 0.80
arrayMethod · 0.80

Calls 2

toStringMethod · 0.95
mapMethod · 0.80

Tested by

no test coverage detected