node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

get-require-vars

get-require-vars

Gets the calls to require() using 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

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