MCPcopy Index your code
hub / github.com/banga/git-split-diffs / format

Function format

src/SpannedString.test.ts:19–25  ·  view source on GitHub ↗
(string: string, spans: [number, number, string][])

Source from the content-addressed store, hash-verified

17}
18
19function format(string: string, spans: [number, number, string][]) {
20 const s = S().appendString(string);
21 for (const span of spans) {
22 s.addSpan(...span);
23 }
24 return apply(s);
25}
26
27test('no spans', () => {
28 expect(format('one two', [])).toEqual('one two');

Callers 1

Calls 4

SFunction · 0.85
applyFunction · 0.85
appendStringMethod · 0.80
addSpanMethod · 0.80

Tested by

no test coverage detected