Returns the full path to binary if it exists and is executable. Returns false otherwise.

await which(binary)

Examples

if (!(await which('convert'))) {
  console.info('You need to install ImageMagick');
}