You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

deps-regex

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deps-regex

Regular expression for matching javascript require statements.

0.1.2
Version published
Weekly downloads
949K
-14.79%
Maintainers
1
Weekly downloads
 
Created

deps-regex

Regular expression for matching javascript require statements.

Install

Install with npm

$ npm i deps-regex --save

Usage

var DepsRegex = require('deps-regex');
var re = new DepsRegex({
  matchInternal: true,
  matchES6: true,
  matchCoffeescript: true
})

re.getDependencies('var foo = require(\'bar\');');
//=>
// [ 'bar']

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

License

Released under the MIT license.

FAQs

Package last updated on 16 Oct 2015

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