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

Function padNumber

lib/test/angular/1.4.3/angular.js:18600–18612  ·  view source on GitHub ↗
(num, digits, trim)

Source from the content-addressed store, hash-verified

18598}
18599
18600function padNumber(num, digits, trim) {
18601 var neg = '';
18602 if (num < 0) {
18603 neg = '-';
18604 num = -num;
18605 }
18606 num = '' + num;
18607 while (num.length < digits) num = '0' + num;
18608 if (trim) {
18609 num = num.substr(num.length - digits);
18610 }
18611 return neg + num;
18612}
18613
18614
18615function 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