DEV Community

Discussion on: 10 useless NPM Package with millions of downloads

Collapse
 
ansile profile image
Ansile

I mean, i get the meme value in in is-odd/is-even packages, but you got useful packages mixed in here too.

array-includes is a polyfill, first published 7 years ago.
array-flatten is kinda the same. It's not a polyfill, in a technical sense, but Array.prototype.flat is a new feature and the package pre-dates it.

ismobilejs is a device os/type/etc detector. Some apps definitely need that.

And store2 is a wrapper with a huge amount of features, some convenience-based (e.g. modifying currently stored value instead of manually doing get+set), and some unique (e.g. checking how many space is left).

Don't just cheapen the work that went into these packages with a "useless" label, if you simply don't know what's the intended use for them.

Collapse
 
jyotishman profile image
Jyotishman Saikia

hi Ansile. I am using all these javascript features in my current project without these packages with some minimal lines of code. so, the label of useless is added.

Collapse
 
loopmode profile image
Jovica Aleksic

Seems you're not in the line of work for more than a couple of years then :)

Thread Thread
 
jyotishman profile image
Jyotishman Saikia

thanks.

Collapse
 
shadowtime2000 profile image
shadowtime2000

I mean for is-odd/is-even your probably able to do it without it with minimal lines of code, but like just because array-includes and array-flatten aren't as important due to the new features Arrays have doesn't mean you should mark it as useless and try to make a joke out of those who download it. I don't understand how your comment works for store2 because that seems to have a lot of features and convenience which you probably can't replicate "without these packages with some minimal lines of code", and for ismobilejs I don't know much exactly how complex it is to detect if its on a mobile device or not, but it sure seems like its not something you could do with some minimal lines of code.

Thread Thread
 
jyotishman profile image
Jyotishman Saikia

I believe store2 is just a feature friendly package of a combination of localstorage and sessionstorage.
I believe any developer can achieve these all tasks

Thread Thread
 
hamishwhc profile image
HamishWHC

And yet you still use NPM packages. Everything is just for convenience. Devs could do everything themselves, but they don't! Why bother reinventing the wheel?

Thread Thread
 
shadowtime2000 profile image
shadowtime2000

I mean yeah you could use localStorage and sessionStorage without store2, but store2 still adds convenience that some people may like for their project, so you shouldn't go and just try to make a joke out of those people saying they are using a useless package. If you look at the README for store2, it adds some features that help you write cleaner code, like with the transact feature, without having to re-invent the wheel.

Collapse
 
nombrekeff profile image
Keff

I have to agree with you here, I did not like the "useless" label neither, and was going to point that out. But I got distracted with is-even and is-odd.

Collapse
 
hyoretsu profile image
Aran Leite • Edited

Yes, but those polyfills are still being downloaded, in 2021. 10m+ times every week.

Collapse
 
jyotishman profile image
Jyotishman Saikia

yes .

Collapse
 
shadowtime2000 profile image
shadowtime2000

Yeah, because people want to support older browsers.