Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danmarshall/get-require-vars

Gets the calls to require() using node-detective plus the JavaScript variable declaration that calls them.
https://github.com/danmarshall/get-require-vars

Last synced: about 4 hours ago
JSON representation

Gets the calls to require() using node-detective plus the JavaScript variable declaration that calls them.

Awesome Lists containing this project

README

        

# get-require-vars
Gets the calls to require() using [node-detective](https://github.com/substack/node-detective) plus the JavaScript variable declaration that calls them.

## Install

Clone this repo, then run:

`npm install`

## Example

`node example/test.js index.js`

### outputs
``` js
{
requires: ['detective', 'escodegen'],
statement: 'var detective = require(\'detective\'),escodegen = require(\'escodegen\')'
}
```