npm command to list installed packages code example
Example 1: list npm packages installed globally
npm list -g --depth 0
Example 2: npm list all installed packages
npm list -g --depth=0
npm list -g --depth 0
npm list -g --depth=0