MCPcopy Create free account
hub / github.com/angular-ui/ui-router / padNumber

Function padNumber

test/angular/1.3/angular.js:17220–17231  ·  view source on GitHub ↗
(num, digits, trim)

Source from the content-addressed store, hash-verified

17218}
17219
17220function padNumber(num, digits, trim) {
17221 var neg = '';
17222 if (num < 0) {
17223 neg = '-';
17224 num = -num;
17225 }
17226 num = '' + num;
17227 while (num.length < digits) num = '0' + num;
17228 if (trim)
17229 num = num.substr(num.length - digits);
17230 return neg + num;
17231}
17232
17233
17234function dateGetter(name, size, offset, trim) {

Callers 3

dateGetterFunction · 0.70
timeZoneGetterFunction · 0.70
weekGetterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected