Like on a *nix system,
ls is short for the list, and that’s what it does: lists the installed modules.
To find out what modules are installed in your project, you can issue this command:
ls command will also list the dependencies of packages installed by the project.
To list global packages add the flag
npm -g ls
This will display the packages installed in the global cache.
To display only top-level packages, you can add the flag
npm ls --depth=0