diff options
Diffstat (limited to 'node_modules/utila/lib/string.js')
| -rw-r--r-- | node_modules/utila/lib/string.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/utila/lib/string.js b/node_modules/utila/lib/string.js new file mode 100644 index 00000000..e574c2cb --- /dev/null +++ b/node_modules/utila/lib/string.js @@ -0,0 +1,14 @@ +// 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; + } + } +}; |
