Permalink
Browse files

make sure its str

  • Loading branch information...
azer committed Aug 15, 2014
1 parent d5023c9 commit 6b25e7775731eb0f5bb5d243a84f609707da6bd7
Showing with 2 additions and 0 deletions.
  1. +2 −0 index.js
@@ -6,6 +6,8 @@ function leftpad (str, len, ch) {
ch || (ch = ' ');
len = len - str.length;

str = String(str);

while (++i < len) {
str = ch + str;
}

0 comments on commit 6b25e77

Please sign in to comment.