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

Function padNumber

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

Source from the content-addressed store, hash-verified

599}
600
601function padNumber(num, digits, trim) {
602 var neg = '';
603 if (num < 0) {
604 neg = '-';
605 num = -num;
606 }
607 num = '' + num;
608 while (num.length < digits) num = '0' + num;
609 if (trim)
610 num = num.substr(num.length - digits);
611 return neg + num;
612}
613
614
615/**

Callers 1

angular-mocks.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected