8 NPM Packages for JavaScript Beginners [2024][+tutorials]
Tags: javascript, beginners, programming, tutorial
Published: 2024-04-02 20:13:29


Hey there! If you're looking to spice up your JavaScript game in 2024, you've come to the right place. We're diving into the world of NPM packages - those little bundles of joy that can make your coding life a heck of a lot easier. From building sleek web applications to mastering data manipulation and beyond, we've got you covered with the crème de la crème of NPM packages you should definitely check out.

## 1. Express.js

Starting off strong with [**Express.js**](https://expressjs.com/), the cool kid on the block for building web apps. It's lightweight, flexible, and doesn't throw a tantrum when you ask it to scale. With Express, you can handle HTTP requests like a pro, play around with middleware, set up routes without breaking a sweat, and render views that make your app look stunning. Big names like Netflix and Uber are already on board, and if it's good enough for them, it's definitely worth a peek.

{% embed https://www.youtube.com/watch?v=SccSCuHhOw0 %}

## 2. Axios

Next up is [**Axios**](https://axios-http.com/docs/api_intro), your go-to pal for making HTTP requests. Whether you're in Node.js land or hanging out in the browser, Axios has got your back with its super intuitive API. Promise-based? Check. Easy error handling? You bet. Plus, with interceptors, you can add those all-important auth headers without a hitch. It's like having a trusty sidekick who's always ready to fetch data for you.

{% embed https://www.youtube.com/watch?v=mS48F0swwAY %}

## 3. Lodash.js

[**Lodash.js**](https://lodash.com/) is like the Swiss Army knife for JavaScript developers. Need to manipulate data structures or dabble in functional programming? Lodash is here to save the day with its arsenal of utilities. It's all about making your code cleaner and your life easier, which is probably why big guns like Google and Airbnb have it in their toolkit.

{% embed https://www.youtube.com/watch?v=TOin8nmYpgc %}

## 4. Underscore.js

Not too far behind is [**Underscore.js**](https://underscorejs.org/), another utility library that's all about enhancing your JavaScript mojo. Whether you're dealing with arrays, objects, or strings, Underscore has got something for you. It's like Lodash's sibling, offering similar functionalities but with its own flair. The choice between them is like picking between chocolate and vanilla - it really comes down to personal taste.

{% embed https://www.youtube.com/watch?v=YBXN1jkYxgA %}

## 5. Moment.js

Ah, [**Moment.js**](https://momentjs.com/), the guardian angel of date and time manipulation. Ever needed to format a date, calculate durations, or display something like "2 days ago"? Moment.js has got your back. It's a lifesaver for anything date and time-related, making it a must-have in your project, especially if you're into making your users feel like you really get them.

{% embed https://www.youtube.com/watch?v=n80RRNS1k64 %}

## 6. PM2

Meet [**PM2**](https://pm2.keymetrics.io/), the process manager that’s here to make your deployment woes disappear. It helps you manage your Node.js processes like a boss, ensuring everything runs smoothly in production. With features like clustering, load balancing, and centralized logging, PM2 is like having a command center for your applications. It's the kind of tool that makes you wonder how you ever lived without it.

{% embed https://www.youtube.com/watch?v=4bS7KS_s8Go %}

## 7. Cheerio

[**Cheerio**](https://cheerio.js.org/) is your ticket to the world of server-side magic, allowing you to manipulate HTML and XML documents with [jQuery](https://jquery.com/)-like syntax. It’s perfect for web scraping, data extraction, or just making sense of the mess that is web content. With Cheerio, you get to play around with the DOM, use CSS selectors, and basically do all the cool things you'd do in the browser, but server-side.

{% embed https://www.youtube.com/watch?v=H8Sh9_n1MPA %}
{% embed https://www.youtube.com/watch?v=KhtEmR2A1Fw %}

## 8. Passport.js

Last but not least, [**Passport.js**](https://www.passportjs.org/) is here to take the pain out of user authentication. Whether you’re implementing local auth, social logins, or OAuth, Passport makes it a breeze. It’s all about letting you focus on the fun parts of your project while it handles the nitty-gritty of user management.

{% embed https://www.youtube.com/watch?v=F-sFp_AvHc8 %}

And there you have it - the top 8 NPM packages that are sure to give your JavaScript projects a boost in 2024. [We](https://evotik.com) use all of these packages, and much more **BUT** Remember, the best tool for the job is the one that suits your needs, so feel free to explore and experiment. Happy coding!

Check out our other articles on [PHP](https://dev.to/evotik/we-write-javascript-all-day-long-but-php-wins-on-backend-1pg) and [Nuxt vs Next.js](https://dev.to/evotik/nuxt-vs-next-biased-opinion-4iei) OR how [we define MVP and think of it](https://www.geocities.ws/evotik/) here.

By the way check our latest **FREE** chrome extension that helps those who hire through [LinkedIn export job applicants here](https://chromewebstore.google.com/detail/linkedin-candidates-expor/cabffljhhneflnhggogdkfidppbnbnkc?hl=en&authuser=1), it is built using pure Javascript and Tailwind CSS, let me know if this is an interesting subject you want to read about (building a chrome extension)

- [NodeJS 22 is Live](https://dev.to/evotik/release-of-nodejs-22-live-what-is-new-100f)