You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
272 B

4 years ago
// Generated by CoffeeScript 1.6.3
module.exports = {
pad: function(n, width, z) {
if (z == null) {
z = '0';
}
n = n + '';
if (n.length >= width) {
return n;
} else {
return new Array(width - n.length + 1).join(z) + n;
}
}
};