JSPM

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

Regular expression for matching javascript require statements.

Package Exports

  • deps-regex

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 (deps-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.