whiches
whiches is essentially a streaming wrapper around isaacs’s which that adds support for arrays of executables.
Install
npm install whiches
Example
var whiches =// => /usr/bin/vlc// => /usr/bin/chromium// /usr/bin/node// => /usr/bin/node
Note
Each path that whiches outputs ends with a new line character, so stream consumers will want to be aware of that.