npm init
Installnpm 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 VersioningMajor.Minor.Patch
^1.4.1 => 1.x
~1.4.1 => 1.4.x
1.4.1 => 1.4.1
Listing the Insatlled Packagenpm list
npm list --depth=0
View Registry Info for a Packagenpm view mongoose
Updating Local Packagesnpm outdated
npm update
DevDependenciesnpm i jshint --save-dev
Uninstalling a Packagenpm uninstall pname npm un pname
Working with Global Package
作者:cell006