MCPcopy Create free account
hub / github.com/observablehq/framework / trim

Method trim

src/sourcemap.ts:95–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93 return positionAdd(ci, l);
94 }
95 trim(): typeof this {
96 const input = this.input;
97 if (input.startsWith("\n")) this.delete(0, 1); // TODO better trim
98 if (input.endsWith("\n")) this.delete(input.length - 1, input.length); // TODO better trim
99 return this;
100 }
101 toString(): string {
102 let output = "";
103 let index = 0;

Callers 11

transpileTagFunction · 0.95
launches.csv.jsFile · 0.80
sourcemap-test.tsFile · 0.80
renderSidebarFunction · 0.80
parseSrcsetFunction · 0.80
resolveSrcsetFunction · 0.80
getProjectIdMethod · 0.80
copyFunction · 0.80
transpileJavaScriptFunction · 0.80
telemetry.md.jsFile · 0.80
parseFideFileFunction · 0.80

Calls 1

deleteMethod · 0.95

Tested by

no test coverage detected