MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / padNumber

Function padNumber

code/songhop/www/lib/angular/angular.js:16950–16961  ·  view source on GitHub ↗
(num, digits, trim)

Source from the content-addressed store, hash-verified

16948}
16949
16950function padNumber(num, digits, trim) {
16951 var neg = '';
16952 if (num < 0) {
16953 neg = '-';
16954 num = -num;
16955 }
16956 num = '' + num;
16957 while (num.length < digits) num = '0' + num;
16958 if (trim)
16959 num = num.substr(num.length - digits);
16960 return neg + num;
16961}
16962
16963
16964function 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