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

Method _getLineNumber

external/.scrollLibs.js:15377–15385  ·  view source on GitHub ↗
(target = this)

Source from the content-addressed store, hash-verified

15375 return this._getLineNumberRelativeTo()
15376 }
15377 _getLineNumber(target = this) {
15378 if (this._cachedLineNumber) return this._cachedLineNumber
15379 let lineNumber = 1
15380 for (let particle of this.root.getTopDownArrayIterator()) {
15381 if (particle === target) return lineNumber
15382 lineNumber++
15383 }
15384 return lineNumber
15385 }
15386 isBlankLine() {
15387 return !this.length && !this.getLine()
15388 }

Callers 3

lineNumberMethod · 0.80
examplesToTestBlocksMethod · 0.80

Calls 1

Tested by

no test coverage detected