list_requires

1.0.2 • Public • Published

list_requires

List the libraries required by some Javascript code by parsing it

Install

npm install list_requires

Usage

var list_requires = require('list_requires');
 
var code = "a=require('foo'); b=require('bar')";
console.log(list_requires(code));
// will output ['foo', 'bar']

If you want to list calls to some function other than require, please use list_requires_multi instead.

License

MIT

Credits

By Geza Kovacs

Package Sidebar

Install

npm i list_requires

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • geza