JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 585094
  • Score
    100M100P100Q185825F

Use minimatch to filter npm module dependencies by name.

Package Exports

  • matchdep

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (matchdep) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

matchdep Build Status

Use minimatch to filter npm module dependencies by name.

Examples

var matchdep = require('matchdep');

// Filter dependencies (with autoloading of package.json from cwd)
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.filterDev('foo-{bar,baz}', './some-other.json');

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

Usage

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

pattern

Type: String Default: none

minimatch compatible pattern to filter dependencies.

config

Type: String or Object Default: path.resolve(process.cwd(), 'package.json')

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