5 npm modules you can't live without?View other answers to this thread
Learn Something New Everyday,
Connect With The Best Developers!
While these are more than 5 libraries, I don't really have any "favorites" globally. I have libraries I use for certain problems, and inside these fields, I have preferences. Nothing too surprising, though, I guess.
- All the TypeScript libraries (typescript, tslib, ts-loaders, type-files, etc.) and ts-node (for quickly running without transpiling)! I stopped writing libs and apps in JS entirely, because I love types, and I love declaring and consuming water-proof contracts. The first thing I do when I set up a new NodeJS or browser project is add TypeScript support.
- A bundler. I tested out WebPack, Rollup, Parcel and WebPack, and that's where I went back to in the end. Sure, it's a lot of work to set up, however it is far easier to handle complex needs and requirements later in the project than what the others offer. Ever tried to write web-components with support for handlebars, scss and typescript with Parcel? It's a nightmare. JAMStack? Don't even...
- What would be code without test? Mocha, and by extension ESLint for static code checks, Chai for assertions and Istanbul for coverage, are my favorites for this tedious task. They also work very well with my IDE, so I can even get in-line coverage and test info and tooling.
- From my Rust-development, I cannot but feel the need for monads sometimes. So, I usually also pull in an appropriate package.
- This might be more of a NodeJS thing, however when not in the browser, I usually require advanced file-system tools, which I can cover with fs-extra and glob.
- Since I did one for NodeJS, let me also add pug, handlebars and sass for the browser. No, I don't regularly React and I don't even Angular - though I really should give them more love, probably.