npmls

Opinionated npm ls - list globally or locally installed node modules.

npmls

Opinionated npm ls - list globally or locally installed node modules.

npm i npmls --save

For more use-cases see the tests

npmls

List installed node modules, globally or locally.

  • [local] {Boolean} list local modules, default false
  • [callback] {Function} node-style callback
  • returns {Array} list of modules if nod callback given

Example

var npmls = require('npmls')
 
console.log(npmls())
//=> [ 'add-package-owners', 
//  'apidocs-cli', 
//  'bower', 
//  'boy', 
//  'browserify', 
//  ... 
// ] 
 
// or asynchronously 
npmls(function (errmodules) {
  if (err) return console.error(err)
 
  console.log(modules)
  //=> [ 'add-package-owners', 
  //  'apidocs-cli', 
  //  'bower', 
  //  'boy', 
  //  'browserify', 
  //  ... 
  // ] 
})

Just run npm install -g npmls to install it globally and try it.

$ npmls -h
Usage: npmls [options]
 
Example
  $ npmls
  minimist
  global-modules
  ...
 
Options
  -v, --version    Shows module version
  -g, --global     Lists globally installed modules
  -h, --help       Shows this help
 
Readme: https://github.com/tunnckoCore/npmls
  • apidocs-cli: Command-line app for generating API docs from code comments. Can… more
  • detect-installed: Checks that given package name is installed locally or globally.… more
  • get-installed-path: Get the installation path of the given package if it… more
  • gitclone-cli: Git clone github repository with pattern like user/repo#branch
  • global-modules: The directory used by npm for globally installed npm modules.
  • is-installed: Checks that given package is installed on the system -… more
  • is-missing: Check that given name or user/repo exists in npm registry… more

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent