MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / advance

Method advance

benchmark/data.js:258–269  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

256 this.pending = null;
257 }
258 advance(str) {
259 if (!str) return;
260 const lines = str.split('\n');
261 if (lines.length > 1) {
262 for (let i = 0; i < lines.length - 1; i++) {
263 this.generatedCodeLine++;
264 this.raw[this.generatedCodeLine] = this.rawSegments = [];
265 }
266 this.generatedCodeColumn = 0;
267 }
268 this.generatedCodeColumn += lines[lines.length - 1].length;
269 }
270}
271const n = '\n';
272const warned = {

Callers 3

addEditMethod · 0.95
generateDecodedMapMethod · 0.95
generateDecodedMapMethod · 0.95

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected