Do we really need all the node.js packages?

No hatin' but each time I keep meeting JavaScript packages like number-is-nan on github. So my question is "Do we really need such packages?"

Talking about the package above, the complete code is like 4 lines. Is it really better for me to just write such code directly or go though the added burden of importing a separate package like this into my application. Since I may need maintain such package later (if the developer stops maintaining it.

What are your thoughts?

Please lets not focus on the specific github repo I mentioned above (I really love sindresorhus` work ). I'm more interested in the usefulness of such small js modules.

Smile over my errors. I'm still learning :)