resolve-bin-sync
v1.0.17
Published
Resolves the bin path for a module
Readme
resolve-bin-sync
Resolves the bin path for a module.
npm install resolve-bin-syncimport resolveBin from 'resolve-bin-sync';
const binPath = resolveBin('package-name'); // bin string or bin entry named same as the module
const namedBinPath = resolveBin('package-name', 'named-bin'); // the named binThe module must be installed and resolvable from the caller. The function returns an absolute path and throws if the package or requested bin entry cannot be resolved.
