0.1.0 • Published 9 years ago

find-exec-v12 v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

find-exec

Build Status

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.

examples

$ which mplayer
which: no mplayer

$ which afplay
/usr/bin/afplay
var command = require('find-exec')(["mplayer", "afplay", "cvlc"])
console.log(command) // afplay
var command = require('find-exec')(["mplayer"])
console.log(command) // null

installation

npm install find-exec

license

MIT