Socket
Socket
Sign inDemoInstall

find-exec

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    find-exec

Finds first available shell command from a list.


Version published
Weekly downloads
3.6K
decreased by-2.87%
Maintainers
1
Install size
48.9 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 24 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc