MCPcopy Index your code
hub / github.com/nodejs/node / pad

Function pad

benchmark/_benchmark_progress.js:5–9  ·  view source on GitHub ↗
(input, minLength, fill)

Source from the content-addressed store, hash-verified

3const readline = require('readline');
4
5function pad(input, minLength, fill) {
6 const result = String(input);
7 const padding = fill.repeat(Math.max(0, minLength - result.length));
8 return `${padding}${result}`;
9}
10
11function fraction(numerator, denominator) {
12 const fdenominator = String(denominator);

Callers 3

fractionFunction · 0.70
getTimeFunction · 0.70
getProgressMethod · 0.70

Calls 2

StringClass · 0.85
maxMethod · 0.45

Tested by

no test coverage detected