npm: Listing installed packages

To get list of installed packages in current folder runnpm ls or npm ls -g to list globally installed packages. 

To view only portion of the list, i.e. to display max depth of the dependency tree, there is a useful flag --depth=<number> . 
Whole command looks like this: npm ls --depth=0 or npm ls --depth=1 -g

Note: If some packages are not registered in npm registry, there will be marked with “extraneous”