init
npm init
Install
npm install underscore
Using
// index.js
const _ = require('underscore')
// require work
// Core module
// File or folder
// node_modules
const result = _.contains([1,2,3],3)
console.log(result)
Semantic Versioning
Major.Minor.Patch
^1.4.1 => 1.x
~1.4.1 => 1.4.x
1.4.1 => 1.4.1
Listing the Insatlled Package
npm list
npm list --depth=0
View Registry Info for a Package
npm view mongoose
Updating Local Packages
npm outdated
npm update
DevDependencies
npm i jshint --save-dev
Uninstalling a Package
npm uninstall pname
npm un pname
Working with Global Package