MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / pad

Function pad

api/mode.ts:473–486  ·  view source on GitHub ↗
(x:string, y:number)

Source from the content-addressed store, hash-verified

471 output:string[] = [],
472 b:number = outputArrays.token.length,
473 pad = function mode_parsePad(x:string, y:number):void {
474 const cc:string = x
475 .toString()
476 .replace(/\s/g, " ");
477 let dd:number = y - cc.length;
478 str.push(cc);
479 if (dd > 0) {
480 do {
481 str.push(" ");
482 dd = dd - 1;
483 } while (dd > 0);
484 }
485 str.push(" | ");
486 },
487 heading:string = "index | begin | ender | lexer | lines | stack | types | token",
488 bar:string = "------|-------|-------|--------|-------|-------------|-------------|------";
489 output.push("");

Callers 1

modeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected