Best Node Modules - Top 10 Node JS Libraries

In this video I want to share with you my favorite node modules and libraries which I used through years of development. So let's jump right into it.

Lodash.

It's a library which I used in a lot of project because we don't have enough native functions in javascript to fulfill our needs. Instead of writing them on our own it's better to take them from Lodash because they are tested and have crossbrowser support. From my point of view in javascript worlds you always need at least 1 library for data transformations and Lodash is the most popular among them.

Ramda

To describe it easy it's a Lodash clone but in fully functional way. So you also get lots of functions from it what simplify your life. But it's much more than that. First of all with Ramda you can write elegant code in functional way. Also all Ramda functions are immutable so you are 100% sure that you never mutate old values. And the last point is that all functions that you see in Ramda are not just to be used but are small blocks to be combined in new functions. So this is super reusable and can help you to improve your Javascript code significantly.

Also if you are interested in Ramda or Lodash I made courses about both this libraries and I will link them down in the description

Luxon

It's the popular library to work with Dates in Javascript. By default the working with Dates in Javascript is difficult verbose and not human readable. Especially when you add timezones to scope of your features. Luxon is the library from guy who was a core contributor in Moment JS. And moment js was the most popular library to work with dates for last 10 years. So Luxon is highly readable library with hundreds of functions which are also all immutable so you are on the safe side.

Query-string

Almost always you need to parse query parameters in your application for either pagination or sorting. And it's painful that in plain Javascript we don't have a simple functions to cover our needs. So instead of writing a bunch of functions to work with query parameters on our own it's better to task query string which helps to parse and stringify our parameters correctly. Also it supports difficult cases like arrays inside query parameters.

Slugify

It's an amazing library if you need to generate slugs from your strings. But here you might ask "It's so easy why not just do it ourselves? It's to lowercase and dashes in between". The valuable point in library is that it works correct with utf8 symbols or cyrillic which can be tricky to implement correctly so I highly recommend it.

Prettier

The main purpose is to intent and beautify your code when you save file without lots of configurations. If you didn't use it yet just start doing it now. Actually I made a whole video about prettier. Frontend development or even development in Node brings the speed of writing code to the next level when you stop thinking how to intent your code correctly.

Eslint

It's a library with lots of useful rules to warn you about bad code. If you are a beginner it will help you to fix and improve places of your code that might not be obvious for you. If you are working in a team eslint can help you to write code in the way how people a doing it in your specific team. So it's a valuable tool to improve your code.

Classnames

And actually it was first created for React but is highly suitable for any applications. It allows you to generate a string of classes based on some logic which makes your code much cleaner than just inline concatenation of strings.

Prop-types

And it was a part of React but at some point was moves out of it. What is allows is to write rules for some objects and then validate your objects. This is working nice for React props when we pass them inside components but you can validate any objects in any framework with it in declarative form.

Commander

This is the best library in node that I saw to create console commands. Normally we just throw a bunch of scripts in package.json but if we have lots of them or difficult arguments inside it's much easier to use commander here. It helps you to create different commands, define arguments, defaults and write complex code with plain nodejs.

So this were my 10 libraries that I used a lot thorough the years. And what libraries do you like most? Write me down in the comments below.

Want to conquer your next JavaScript interview? Download my FREE PDF - Pass Your JS Interview with Confidence and start preparing for success today!

Did you like my post? Share it with friends!
Don't miss a thing!
Follow me on Youtube, Twitter or Instagram.
Oleksandr Kocherhin
Oleksandr Kocherhin is a full-stack developer with a passion for learning and sharing knowledge on Monsterlessons Academy and on his YouTube channel. With around 15 years of programming experience and nearly 9 years of teaching, he has a deep understanding of both disciplines. He believes in learning by doing, a philosophy that is reflected in every course he teaches. He loves exploring new web and mobile technologies, and his courses are designed to give students an edge in the fast-moving tech industry.