News for hackers. Stuff that matters.
Re:Show HN: Remove-bg – open-source remove background using ... by ashishb on Monday August 26, 2024 @03:54PM (#41361154)
JS standard library is very limited. So, pulling in third party dependencies to even left pad a string is normal.
Re:Show HN: Remove-bg – open-source remove background using ... by throwaway63820 on Monday August 26, 2024 @04:01PM (#41361236)
you mean the native `str.padStart(targetLength, padString)`
Re:Show HN: Remove-bg – open-source remove background using ... by zamadatix on Monday August 26, 2024 @05:43PM (#41362533)
To be fair (as one who leans pretty heavy in favor of the JS world) .padStart() was only added in response to the aforementioned left-pad fiasco. The language adding that was more a face saving measure from the blowback than an attempt to fix the actual problems.

Despite all that, left-pad still gets > 1 million weekly downloads on npm.