0.0.4 • Published 10 years ago
search-modules v0.0.4
search-modules
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)