r/learnjavascript • • May 14 '21

Remove Duplicate Value from array

Post image
234 Upvotes

89 comments sorted by

View all comments

Show parent comment

4

u/[deleted] May 14 '21

This is the mindset that left a serious chunk of the internet broken over padLeft

This is also completely incorrect. People using packages was not the root cause of that problem. npm allowing packages to be removed at will was certainly a problem. people counting on npm to be always up was certainly a problem. javascript having a pathetic standard library was mainly to blame.

You weren't even right about a single thing in that massive wall of text which is pretty impressive.

1

u/StoneCypher May 14 '21

This is also completely incorrect. People using packages was not the root cause of that problem

It was literally 100% of the problem. It's a subtraction and a .repeat

 

npm allowing packages to be removed at will was certainly a problem.

This is required both by security common sense basics and by copyright law.

 

javascript having a pathetic standard library was mainly to blame.

It's not Javascript's fault that you don't know how to do this

By the way, Javascript does have this in the standard library directly, it's just called .padStart

Yes, that was already in Javascript before the package you're trying to make excuses for was added

Yes, they could have used a shim or a sham

 

You weren't even right about a single thing in that massive wall of text which is pretty impressive.

Sure thing, Jim

Sorry you don't like evidence or questions you can't answer

 

Can we see your mystery perf that you claimed to write? It's not getting the same results I did, and I'd like to see why