search-modules

0.0.4 • Public • Published

search-modules

Build Status

Install

$ npm install search-modules

Examples

Search modules with name

var search = require('search-modules');
 
// geunt or /^grunt-/ or (/^gulp/ and /gulp$/)
 
search(module.paths)
  .filter('name', 'grunt', /^grunt-/, [/^gulp/, /gulp$/])
  .on('data', function (pkg) {
    console.log('%s: %s', pkg.name, pkg.dir);
  })

Search modules with keywords

var search = require('search-modules');
 
// stream and gulp
 
search(module.paths)
  .filter('keywords', ['stream', 'gulp'])
  .on('data', function (pkg) {
    console.log('%s: %s', pkg.name, pkg.dir);
  })
 
// grunt or gulp
 
search(module.paths)
  .filter('keywords', 'grunt', 'gulp')
  .on('data', function (pkg) {
    console.log('%s: %s', pkg.name, pkg.dir);
  })

License

The MIT License (MIT)

http://poying.mit-license.org/

Readme

Keywords

Package Sidebar

Install

npm i search-modules

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • poying