Why Should You Use NPM Packages?
NPM packages decreases development time, reduces the chance of inconsistencies across all devices that your site is being accessed under, and introduces the library of modules that you might be looking for into your project with just one call. Along with NPM packages comes npm quick start which installs dependencies in your package so you can focus on developing functionality instead of fiddling with code.
5 Must-Have NPM Packages for Web Developers
Lodash is one of the most popular NPM packages that allow you to do some really powerful things with data, arrays, numbers, objects.
lodash is a utility library that offers many functions that are missing in the underscore. These utilities are often used, high-performance versions of the most commonly used functions. Both lodash and underscore offer the same built-in functions, but both libraries have 100s of other built-in functions not found in the other - hence why both packages are needed if you want to be fully productive with all necessary tools.
How to install using NPM:
$ npm i --save lodash
Explore more about lodash - https://lodash.com/
Dotenv is a zero-dependency module to load environment variables from a .env file into process.env. Keeping configuration in the environment separate from code is based on The Twelve-Factor App methodology.
The dotenv package allows you to store these variables in a file with a .env extension, and it's a lot more convenient than passing the values around in numerous config files. When using dotenv, you just need to require the right package and set your variables.
# with npm
$ npm install dotenv
# or with Yarn
$ yarn add dotenv
Explore more about dotenv: https://github.com/motdotla/dotenv#readme
The Bcrypt package stores password with strong encryption hashed passwords. It does this by salting hashing, which is encrypted into chunks that are tens of characters long for added security.
You can use bcrypt to hash passwords on the client-side if you use Node.js, or on the server-side in your Node.js application.
$ npm i bcrypt
Explore more about Bcrypt: https://github.com/kelektiv/node.bcrypt.js#readme
Axios is an npm package, designed to make RESTful API requests, across all major available transports (XMLHttpRequest, fetch, JSONP). You can also select the Custom Custom Request option.
This is one of the most-used packages by front-end developers, Axios is a small library that allows cross-origin HTTP calls to any endpoint. This package can basically simplify any AJAX call by removing the global states and adding a wide range of configuration options.
# using npm
$ npm install axios
# using yarn
$ yarn add axios
Explore more about axios npm package: https://axios-http.com/
This package is invaluable for catching mistakes. Use it to output computations and test conditions, and it even covers the console and DOM!
$ npm install debug
Explore more about debug package: https://github.com/visionmedia/debug#readme