Java/.NET/C++/etc. people don’t have the urge to publish every other line of code they deem “useful”. They also don’t have the urge to import said one-liners when writing a helper method in 15 seconds is perfectly adequate.
I do for my code sometimes, except I make GitHub Gists out of them instead of putting them on NPM.