The mine script accepts js source and returns all the require call locations as well as the target string. This is a submodule of js-linker and my-filters.
var mine = require'js-linker/mine.js';
var fs = require'fs';
var code = fsreadFileSync"test.js";
var deps = minecode;