witch
require.resolve for binariesGiven the name of a locally installed dependency, witch will return the paths to the module's associated binary scripts.
Example
const witch = require('witch');
witch('gulp');
// returns "/Users/lennym/dev/my-project/node_modules/gulp/bin/gulp.js"
For modules which include more than one binary script, you can pass a specific binary name as a second parameter.
const witch = require('witch');
witch('mocha', '_mocha');
// returns "/Users/lennym/dev/my-project/node_modules/mocha/bin/_mocha"