Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

matchdep

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matchdep

Use micromatch to filter npm module dependencies by name.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
970K
decreased by-6.61%
Maintainers
2
Weekly downloads
 
Created

What is matchdep?

The matchdep npm package is used to filter dependencies by name patterns. It is particularly useful in build systems like Grunt to dynamically load tasks based on specific patterns.

What are matchdep's main functionalities?

Filter Dependencies by Pattern

This feature allows you to filter dependencies in your package.json that match a specific pattern. In this example, it filters all dependencies that start with 'grunt-'.

const matchdep = require('matchdep');
const matchedDeps = matchdep.filter('grunt-*');
console.log(matchedDeps);

Filter DevDependencies by Pattern

This feature allows you to filter devDependencies in your package.json that match a specific pattern. In this example, it filters all devDependencies that start with 'grunt-'.

const matchdep = require('matchdep');
const matchedDevDeps = matchdep.filterDev('grunt-*');
console.log(matchedDevDeps);

Filter All Dependencies by Pattern

This feature allows you to filter all dependencies (both dependencies and devDependencies) in your package.json that match a specific pattern. In this example, it filters all dependencies that start with 'grunt-'.

const matchdep = require('matchdep');
const matchedAllDeps = matchdep.filterAll('grunt-*');
console.log(matchedAllDeps);

Other packages similar to matchdep

Keywords

FAQs

Package last updated on 18 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc