Check if the binary exists on system
$ npm install --save bin-exists
const binExists = require('bin-exists');
// async
binExists('node').then(val => {
console.log(val);
//=> true
});
binExists('foo').then(val => {
console.log(val);
//=> false
});
// sync
console.log(binExists.sync('node'));
//=> true
console.log(binExists.sync('foo'));
//=> false
Returns promise for an input value
Returns boolean for an input value
Type: string
Required: true
Input command name
MIT © Guntur Poetra