MCPcopy Create free account
hub / github.com/garris/BackstopJS / pad

Function pad

core/util/createBitmaps.js:42–48  ·  view source on GitHub ↗
(number)

Source from the content-addressed store, hash-verified

40 const totalScenarioCount = configJSON.scenarios.length;
41
42 function pad (number) {
43 let r = String(number);
44 if (r.length === 1) {
45 r = '0' + r;
46 }
47 return r;
48 }
49
50 const screenshotNow = new Date();
51 let screenshotDateTime = screenshotNow.getFullYear() + pad(screenshotNow.getMonth() + 1) + pad(screenshotNow.getDate()) + '-' + pad(screenshotNow.getHours()) + pad(screenshotNow.getMinutes()) + pad(screenshotNow.getSeconds());

Callers 1

decorateConfigForCaptureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected