Hacker News new | ask | show | jobs
by wolco 2161 days ago
The lack of a standard lib puts pressure on the ecosystem to provide simple functionality like leftpad for every project. Managing those is diffcult.
1 comments

Left pad specifically is part of the standard library now: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Yes, there are still shortcomings, but to me, the biggest shortcoming is too much legacy crap that doesn’t use the standard library. For example, Express predates the standard request, response, and URL classes, so it invents its own. Plus Node doesn’t even fetch FFS. If everyone actually wrote things in modern JS, the situation would be better.