left-pad npm package
Shares rank 14 of 24 JavaScript libraries by recommenders
Tiny npm package that pads strings to a set length, filling a gap JavaScript lacked at the time. Critics call it an unnecessary dependency for trivial code.
Tiny npm package that pads strings to a set length, filling a gap JavaScript lacked at the time. Critics call it an unnecessary dependency for trivial code.
35 people gave an opinion
- recommend it
- 9
- criticize it
- 26
- approval share
- 26%
Recommended in 6 of 13 months
- November 2025: not recommended
- December 2025: not recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: not recommended
- August 2026: not recommended
- September 2026: recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it doesn’t carry the badge
- 9 people recommend itNeeds 10 or more, not met.
- 0.3 recommenders for every criticNeeds 2 to 1 or better, not met.
- Recommended in 6 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Filled gap in JavaScript's standard library
“isarray and left-pad are at least functions that didn't used to be in the standard library”
Comment from 17 Sep 2026 in “My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it” “it did one thing that js didn't natively do”
Comment from 21 Sep 2026 in “Jev-Leftpad” Widely downloaded and depended on
“imagine where the JavaScript ecosystem would be if packages like is-array and left-pad couldn't get accepted to npm”
Comment from 29 Apr 2026 in “Before GitHub” “Even left-pad is still getting 1.6 million weekly downloads.”
Comment from 31 Mar 2026 in “Axios Compromised on NPM – Malicious Versions Drop Remote Access Trojan”
What people warn about
Each mark is one comment
Trivial code not worth a dependency
“There seem to be a lot of packages for extremely trivial things that nonetheless gets huge amounts of downloads”
Comment from 22 Dec 2025 in “Engineering dogmas it's time to retire” “Check out left pad or the two dozen other "utility" packages that could be done in a single line of code.”
Comment from 2 Jun 2026 in “Adafruit Receives Demand Letter from Fenwick Legal Counsel on Behalf of Flux.ai” “Left-pad was 11 lines of code. Literally no reason to pull in an external dependency for that.”
Comment from 6 Nov 2025 in “Supply chain attacks are exploiting our assumptions” - Comment from 16 Nov 2025 in “The fate of "small" open source”
- Comment from 17 Nov 2025 in “The fate of "small" open source”
Breaks installs when removed from npm
“It was famous for bringing down everyone's npm installs a few years ago.”
Comment from 21 Sep 2026 in “Jev-Leftpad” “left thousands of packages broken when it was taken off npm”
Comment from 31 Oct 2026 in “Malware uses LLMs to rank victims by how much they're worth” Edge-case bugs with multi-character padding
“Both old and new versions return a string longer than `len` if the padding char is multiple characters”
Comment from 8 May 2026 in “Maybe you shouldn't install new software for a bit” “The infamous leftpad library didn't handle certain edge doses properly.”
Comment from 8 May 2026 in “Maybe you shouldn't install new software for a bit” Discourages writing simple code yourself
“People are trying to shove as much shiny tools as possible instead of sometimes writing 10 vanilla JS lines”
Comment from 5 Jan 2026 in “Web development is fun again” “projects were importing a one-liner package and blindly using it, which requires no skill”
Comment from 19 Oct 2026 in “It's still ok to enjoy programming” “it was always a better idea to build your own instead of depending on that”
Comment from 27 Jan 2026 in “ChatGPT Containers can now run bash, pip/npm install packages and download files” - Comment from 11 Jan 2026 in “Don't fall into the anti-AI hype”
Other JavaScript libraries people recommend
The four most recommended other JavaScript libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| jQuery | 111 | 48 | 70% | 12 | 16 yrs8 owners | Approved |
| Picknplace.js | 58 | 26 | 69% | 1 | — | — |
| Alpine.js | 50 | 16 | 76% | 11 | 1 yr4 owners | Approved |
| Effect (TypeScript library) | 38 | 16 | 70% | 10 | 2 yrs3 owners | Approved |
| left-pad npm packageThis page | 9 | 26 | 26% | 6 | — | — |
What people said
31 of the 35 comments that mention it, newest first. Each links to the original comment.
“left thousands of packages broken when it was taken off npm”
“projects were importing a one-liner package and blindly using it, which requires no skill”
“removed it from NPM a decade ago crashing everything”
“It did one thing that you could write in one line of code.”
“it did one thing that js didn't natively do”
“It was famous for bringing down everyone's npm installs a few years ago.”
“a useless package from years ago that many important packages used instead of writing the code themselves”
“left-pad levels of "we should just implement trivial functions in our own codebases"”
“isarray and left-pad are at least functions that didn't used to be in the standard library”
“remove the need for left-pad silliness”
“This is the same community that brought us left-pad.”
“Check out left pad or the two dozen other "utility" packages that could be done in a single line of code.”
“rust authors embrace the culture that gave us left-pad”
“Both old and new versions return a string longer than `len` if the padding char is multiple characters”
“The infamous leftpad library didn't handle certain edge doses properly.”
“imagine where the JavaScript ecosystem would be if packages like is-array and left-pad couldn't get accepted to npm”
“NPM nonsense like LeftPad and IsEven and IsNumber”
“Even left-pad is still getting 1.6 million weekly downloads.”
“Something like left-pad should simply not be admitted to npm.”
“Not saying left pad is a good idea”
“Left-pad isn't a success story to be reproduced.”
“it was always a better idea to build your own instead of depending on that”
“you end up depending on left-pad because writing it yourself was boring”
“People are trying to shove as much shiny tools as possible instead of sometimes writing 10 vanilla JS lines”
“learning why you should avoid left-pad but accept date-fns”
“stuff like the left pad debacle”
“There seem to be a lot of packages for extremely trivial things that nonetheless gets huge amounts of downloads”
“It's just missing an order for the chatbot to say "I know left-pad" before actually doing any work.”
“left-pad needs 9kb to download and the code is a handful of lines”
“fewer people are including silly dependencies like isEven or leftPad”
“Left-pad was 11 lines of code. Literally no reason to pull in an external dependency for that.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.