Kaizen Today I Learned by Ville Säävuori

Recommended JS/TS Packages

I’ve been working with modern JavaScript applications actively since 2016. One of the challenges of the JS ecosystem is the outrageous number of available packages. This is a continuously gardened list of useful and preferred JavaScript/TypeScript packages that I’ve personally worked with.


Preferred: day.js (Github)

Day.js is a great modern alternative to moment.js. It’s small, tree-shakeable, and ships with full TypeScript support. It also has a ton of plugins that will most likely cover all of your needs out of the box.

Alternatives: date-fns, luxon

Avoid / deprecate: moment.js (EOL)


Preferred: axios (Github)

If you need to do HTTP queries from your app, just install axios and be done with it. Sure, you’ll save ~6k from the bundle if you just use fetch or some tiny wrapper for it but when your project grows, your needs will grow and you’ll end up installing axios anyway. It’s feature-complete, well documented, fully typed, and production ready – just use it.

Alternatives: gazillion.


Preferred: Rambda (Github)

Most JS developers know lodash or its predecessor underscore. Nowadays there are much better and modern alternatives. Rambda focuses on functional programming and speed. It has a smaller API but it’s fully typed and super fast. It’s also well documented.

First consider not including any utility library at all. Modern ES has tons of functionality, yyou should try to use the native functions if possible. If you need more, try Rambda.

Alternatives: Ramda

Avoid / deprecate: underscore, lodash

Tagged with , ,

Published . Last modified .