Get all npm packages installed globally
$ yarn add npm-global-list
const npmGlobalList = require('npm-global-list')
npmGlobalList().then(pkgs => console.log(pkgs))
// => ['list', 'of', 'globally', 'installed', 'packages', ...]
Returns a promise
- npm-global-list-cli — CLI for this module
MIT © Bu Kinoshita