2.0.0 • Published 8 years ago

matchdep v2.0.0

Weekly downloads
1,081,291
License
MIT
Repository
github
Last release
8 years ago

matchdep Build Status

Use micromatch to filter npm module dependencies by name.

NPM

Examples

var matchdep = require('matchdep');

// Filter dependencies (by autoloading nearest package.json)
matchdep.filter('mini*');

// Filter devDependencies (with config string indicating file to be required)
matchdep.filterDev('grunt-contrib-*', './package.json');

// Filter peerDependencies (with config string indicating file to be required)
matchdep.filterPeer('foo-{bar,baz}', './some-other.json');

// Filter all dependencies (with explicit config provided)
matchdep.filterAll('*', require('./yet-another.json'));

// Filter all dependencies, exclude grunt (multiple matching patterns)
matchdep.filterAll(['*','!grunt']);

Usage

filter(pattern, config)
filterDev(pattern, config)
filterPeer(pattern, config)
filterAll(pattern, config)

pattern

Type: String|Array Default: 'none'

A micromatch compatible match pattern to filter dependencies.

config

Type: String or Object Default: Path to nearest package.json.

If config is a string, matchdep will attempt to require it. If it is an object, it will be used directly.

Release History

  • 2017-08-18 - v2.0.0 - Upgrade major versions of dependencies, Upgrade devDeps
  • 2016-02-09 - v1.0.1 - switch to micromatch, remove globule
  • 2015-09-27 - v1.0.0 - throw when no package.json found, update dependencies, remove node 0.8 support
  • 2013-10-09 - v0.3.0 - support multiple pattern matches using globule
  • 2013-10-08 - v0.2.0 - refactor and support filtering peerDependencies
  • 2012-11-27 - v0.1.0 - initial release
@mathigon/textbooks-serverswu-maildev@gravityforms/webpack-config@infinitebrahmanuniverse/nolb-matc@everything-registry/sub-chunk-2137swig-extensionstennatempgulp4-clijeuxuijq-signaturejquery.switcherhubot-wizards-duelhubot-ubereatshubot-graphite-sendgrunt-startupgulp-cli.buildgulp-cli4gulp-claphomescreenhcm-jsgulp4-ing-cliinstallablehydra-validatorm2m-chartjs-plugin-crosshairmachao-component-libraryload-modules@wiajs/cli@xilution/xilution-web-client-build@thismr/bitmindtest-corealiqin-gruntalisselisss-lab3ag-gulp-cli-4agave-documentationadapt-originamd-unit-test-runneratt.jsasimov-buildformat-moment-testgenerator-hubot-botgenerator-admogenerator-bcapienumerate-cliexpress-hbsc1000-packages@benovshe/sasslibrarychocolate.jscollaborative_filteringdbscanbrick-gruntbuild-workflowbetter-gulp-clibridgeline-kabinet3.0.0@brucearmstrong/sass-librarylayui-customdfeuk-frontenddfeuk-frontend-manualstudentbeansui-frameworkwebtasker-cli@lofcz/sweetalert2-neutral@litedexdev/litedex-core-swapmt-gulp-climole-gulpn8n-nodes-caldavnucleo-cliprofacts-js-consultnostrumquasportal.pathwar.netquick-grunt-config-mocha-saucerangoli-csssimple-notificationsshoppinpal-warehouse-mongosimply-uigrunt-bower-mapgrasshopper-admingrunt-jira-actionsgrunt-lyria-assetsgrunt-build-gh-pagesgrunt-voce-pluginsgrunt-utilitiesgrunt-wc-buildgruntventiongrunt-imwebgrunt-contribgrunt-embarkgrunt-embark-nosim@ddes/cli@ctfdio/picocss-themes@diogom14/circuit-craft-core@dword-design/base-config-name@faizanhaider/iconsax@gravityforms/gulp-tasks@igniswap/igni-swap-lib@headgum/tko-mapping@min98/layui-custom@isogand/react-native-sliding-counter@roomrtc/mediaserver@sequencemedia/gulp-cli@sparkpost/gruntfile
2.0.0

8 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.3.0

12 years ago

0.2.0

12 years ago

0.1.2

13 years ago

0.1.1

13 years ago

0.1.0

13 years ago