find-exec
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/find-exec package

1.0.3 • Public • Published

find-exec

Downloads

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

Package Sidebar

Install

npm i find-exec

Weekly Downloads

3,576

Version

1.0.3

License

MIT

Unpacked Size

5.07 kB

Total Files

8

Last publish

Collaborators

  • shime