Takes a list of shell commands and returns the first available. Works synchronously to respect the order.
Returns null if none of the listed commands were found.
$ which mplayer
which: no mplayer
$ which afplay
/usr/bin/afplay
varcommand=require('find-exec')(["mplayer","afplay","cvlc"])console.log(command)// afplayvarcommand=require('find-exec')(["mplayer"])console.log(command)// nullnpm install find-exec
MIT