2.0.0 • Published 7 years ago

matchdep v2.0.0

Weekly downloads
1,081,291
License
MIT
Repository
github
Last release
7 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-2137portal.pathwar.netprofacts-js-consult@gravityforms/gulp-tasks3.0.0@brucearmstrong/sass-librarylayui-customrangoli-cssquick-grunt-config-mocha-sauce@ddes/clisimply-uitempgulp4-clitennastudentbeanssimple-notificationsshoppinpal-warehouse-mongoswig-extensionsui-frameworkwebtasker-clidfeuk-frontenddfeuk-frontend-manual@lofcz/sweetalert2-neutral@litedexdev/litedex-core-swapgrasshopper-admingrunt-lyria-assetsgrunt-contribgrunt-bower-mapgrunt-build-gh-pagesgrunt-startupgrunt-voce-pluginsgrunt-utilitiesgrunt-imwebgrunt-jira-actionsgrunt-embarkgrunt-embark-nosimformat-moment-test@min98/layui-customgenerator-hubot-botgenerator-admogenerator-bcapiexpress-hbsc@dword-design/base-config-nameinstallablehydra-validatorgrunt-wc-buildgruntventionhubot-graphite-send@roomrtc/mediaserver@headgum/tko-mapping@isogand/react-native-sliding-counterdbscan@igniswap/igni-swap-libenumerate-clihomescreengulp-cli.buildgulp-cli4gulp-clapgulp4-ing-clihcm-jshubot-wizards-duelhubot-ubereatsjquery.switcher@sequencemedia/gulp-cli@faizanhaider/iconsax@sparkpost/gruntfilejeuxuijq-signature@thismr/bitmindtest-core@benovshe/sasslibraryn8n-nodes-caldavbetter-gulp-cliasimov-buildnostrumquaschocolate.jsnucleo-cliatt.jsmt-gulp-climole-gulpadapt-originag-gulp-cli-4agave-documentationbuild-workflow@ctfdio/picocss-themesm2m-chartjs-plugin-crosshair1000-packages@wiajs/climachao-component-library@xilution/xilution-web-client-buildload-modulesamd-unit-test-runneraliqin-gruntalisselisss-lab3bridgeline-kabinetbrick-gruntcollaborative_filtering
2.0.0

7 years ago

1.0.1

8 years ago

1.0.0

9 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago