Without a reasonable way to pad a string using native methods, working with JavaScript strings today is more painful than it should be. Without these functions, the language feels incomplete, and is a paper cut to what could be a very polished experience.
Something about this paragraph cracks me up. I consider ECMAScript a lot of things - useful, ubiquitous, utilitarian - but I don’t consider it anywhere near polished. It lacks a HUGE amount of standard lib functionality, of which I find it odd to pick out this one thing as being “a papercut” - unless the author thinks there are hundreds of paper cuts going on here.
I don’t think this is a terrible idea, but I chalk it up as one of the MANY deficiencies in the standard lib. Pick almost any feature from lodash and you can say the same thing.
The rationale starts with:
Something about this paragraph cracks me up. I consider ECMAScript a lot of things - useful, ubiquitous, utilitarian - but I don’t consider it anywhere near polished. It lacks a HUGE amount of standard lib functionality, of which I find it odd to pick out this one thing as being “a papercut” - unless the author thinks there are hundreds of paper cuts going on here.
I don’t think this is a terrible idea, but I chalk it up as one of the MANY deficiencies in the standard lib. Pick almost any feature from lodash and you can say the same thing.