MCPcopy
hub / github.com/angular-ui/ui-router / padNumberInMock

Function padNumberInMock

test/angular/1.5/angular-mocks.js:589–601  ·  view source on GitHub ↗
(num, digits, trim)

Source from the content-addressed store, hash-verified

587}
588
589function padNumberInMock(num, digits, trim) {
590 var neg = '';
591 if (num < 0) {
592 neg = '-';
593 num = -num;
594 }
595 num = '' + num;
596 while (num.length < digits) num = '0' + num;
597 if (trim) {
598 num = num.substr(num.length - digits);
599 }
600 return neg + num;
601}
602
603
604/**

Callers 1

angular-mocks.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected