matching-deps

0.0.1 • Public • Published

Require matching modules from package.json

Installing:

npm install matching-deps

makes it possible to require matching modules from package.json:

requireMatchingDeps = require('matching-deps');
requireMatchingDeps([/^foobar-.\*/, /^more-stuff.\*/], {dev: true})

or simply

require('matching-deps')([/^foobar-.\*/, /^more-stuff.\*/], {dev: true})

The returned function has the signature:

requireMatchingDeps(match[, opts])

Where match is a RegExp or an array of ReqExps.

The argument opts is an optional object. If opts.dev is truthy package.devDependencies is used instead of package.dependencies.

Readme

Keywords

none

Package Sidebar

Install

npm i matching-deps

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • aklt