MCPcopy Create free account
hub / github.com/TypeStrong/tsify / indexToLineAndColumn

Function indexToLineAndColumn

test/test.js:806–809  ·  view source on GitHub ↗
(src, index)

Source from the content-addressed store, hash-verified

804}
805
806function indexToLineAndColumn(src, index) {
807 var indexOfLine = src.lastIndexOf('\n', index-1) + 1;
808 return { line: countLinesUntil(src, indexOfLine), column: index - indexOfLine };
809}
810
811function expectFiles(t, emitted, expected) {
812

Callers 1

expectMappedTokenFunction · 0.85

Calls 1

countLinesUntilFunction · 0.85

Tested by

no test coverage detected