main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
272 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | // Generated by CoffeeScript 1.6.3
|
---|
| 2 | module.exports = {
|
---|
| 3 | pad: function(n, width, z) {
|
---|
| 4 | if (z == null) {
|
---|
| 5 | z = '0';
|
---|
| 6 | }
|
---|
| 7 | n = n + '';
|
---|
| 8 | if (n.length >= width) {
|
---|
| 9 | return n;
|
---|
| 10 | } else {
|
---|
| 11 | return new Array(width - n.length + 1).join(z) + n;
|
---|
| 12 | }
|
---|
| 13 | }
|
---|
| 14 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.