MCPcopy Index your code
hub / github.com/angular-ui/ui-router / padNumber

Function padNumber

test/angular/1.2/angular-mocks.js:588–599  ·  view source on GitHub ↗
(num, digits, trim)

Source from the content-addressed store, hash-verified

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

Callers 1

angular-mocks.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected