Hacker ApprovedDepartments

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%
Each figure is one person. RecommendsCriticizes

Recommended in 6 of 13 months

  1. November 2025: not recommended
  2. December 2025: not recommended
  3. January 2026: not recommended
  4. February 2026: recommended
  5. March 2026: recommended
  6. April 2026: recommended
  7. May 2026: recommended
  8. June 2026: recommended
  9. July 2026: not recommended
  10. August 2026: not recommended
  11. September 2026: recommended
  12. October 2026: not recommended
  13. 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”
  • 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”

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.

left-pad npm package compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
jQuery1114870%1216 yrs8 ownersApproved
Picknplace.js582669%1——
Alpine.js501676%111 yr4 ownersApproved
Effect (TypeScript library)381670%102 yrs3 ownersApproved
left-pad npm packageThis page92626%6——
See all 24 JavaScript libraries, ranked

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”

CriticizesComment from 31 Oct 2026 in “Malware uses LLMs to rank victims by how much they're worth”

“projects were importing a one-liner package and blindly using it, which requires no skill”

CriticizesComment from 19 Oct 2026 in “It's still ok to enjoy programming”

“removed it from NPM a decade ago crashing everything”

CriticizesComment from 27 Sep 2026 in “On caring for user data: NeoVim caused Vim undo files to be deleted”

“It did one thing that you could write in one line of code.”

CriticizesComment from 21 Sep 2026 in “Jev-Leftpad”

“it did one thing that js didn't natively do”

RecommendsComment from 21 Sep 2026 in “Jev-Leftpad”

“It was famous for bringing down everyone's npm installs a few years ago.”

CriticizesComment from 21 Sep 2026 in “Jev-Leftpad”

“a useless package from years ago that many important packages used instead of writing the code themselves”

CriticizesComment from 21 Sep 2026 in “Jev-Leftpad”

“left-pad levels of "we should just implement trivial functions in our own codebases"”

MixedComment from 17 Sep 2026 in “My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it”

“isarray and left-pad are at least functions that didn't used to be in the standard library”

MixedComment from 17 Sep 2026 in “My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it”

“remove the need for left-pad silliness”

CriticizesComment from 20 Aug 2026 in “Bun 1.4”

“This is the same community that brought us left-pad.”

CriticizesComment from 14 Aug 2026 in “Choose Boring Technology (2015)”

“Check out left pad or the two dozen other "utility" packages that could be done in a single line of code.”

CriticizesComment from 2 Jun 2026 in “Adafruit Receives Demand Letter from Fenwick Legal Counsel on Behalf of Flux.ai”

“rust authors embrace the culture that gave us left-pad”

CriticizesComment from 25 May 2026 in “Migrating from Go to Rust”

“Both old and new versions return a string longer than `len` if the padding char is multiple characters”

MixedComment 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.”

CriticizesComment from 8 May 2026 in “Maybe you shouldn't install new software for a bit”

“imagine where the JavaScript ecosystem would be if packages like is-array and left-pad couldn't get accepted to npm”

MixedComment from 29 Apr 2026 in “Before GitHub”

“NPM nonsense like LeftPad and IsEven and IsNumber”

CriticizesComment from 8 Apr 2026 in “Explore union types in C# 15”

“Even left-pad is still getting 1.6 million weekly downloads.”

MixedComment from 31 Mar 2026 in “Axios Compromised on NPM – Malicious Versions Drop Remote Access Trojan”

“Something like left-pad should simply not be admitted to npm.”

CriticizesComment from 31 Mar 2026 in “Axios Compromised on NPM – Malicious Versions Drop Remote Access Trojan”

“Not saying left pad is a good idea”

MixedComment from 14 Feb 2026 in “Stoat removes all LLM-generated code following user criticism”

“Left-pad isn't a success story to be reproduced.”

CriticizesComment from 14 Feb 2026 in “Stoat removes all LLM-generated code following user criticism”

“it was always a better idea to build your own instead of depending on that”

CriticizesComment from 27 Jan 2026 in “ChatGPT Containers can now run bash, pip/npm install packages and download files”

“you end up depending on left-pad because writing it yourself was boring”

CriticizesComment from 11 Jan 2026 in “Don't fall into the anti-AI hype”

“People are trying to shove as much shiny tools as possible instead of sometimes writing 10 vanilla JS lines”

CriticizesComment from 5 Jan 2026 in “Web development is fun again”

“learning why you should avoid left-pad but accept date-fns”

CriticizesComment from 30 Dec 2025 in “Karpathy on Programming”

“stuff like the left pad debacle”

CriticizesComment from 24 Dec 2025 in “Deprecate like you mean it”

“There seem to be a lot of packages for extremely trivial things that nonetheless gets huge amounts of downloads”

CriticizesComment from 22 Dec 2025 in “Engineering dogmas it's time to retire”

“It's just missing an order for the chatbot to say "I know left-pad" before actually doing any work.”

CriticizesComment from 18 Dec 2025 in “Skills for organizations, partners, the ecosystem”

“left-pad needs 9kb to download and the code is a handful of lines”

CriticizesComment from 17 Nov 2025 in “The fate of "small" open source”

“fewer people are including silly dependencies like isEven or leftPad”

CriticizesComment from 16 Nov 2025 in “The fate of "small" open source”

“Left-pad was 11 lines of code. Literally no reason to pull in an external dependency for that.”

CriticizesComment from 6 Nov 2025 in “Supply chain attacks are exploiting our assumptions”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.