Reply to post: Bug in leftpad

How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript

Anonymous Coward
FAIL

Bug in leftpad

If ch isn't a single character, then the len param makes no sense. Calling leftpad with ch set to 'fondue' and len set to 100 won't result in a 100 character string.

I can see v0.04 being required pretty soon. I could of course submit a patch. But I don't care enough about left padding strings in JS.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019