Socket
Socket
Sign inDemoInstall

bin-check

Package Overview
Dependencies
2
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bin-check

Check if a binary is working


Version published
Weekly downloads
1.6M
increased by7.13%
Maintainers
1
Install size
12.5 kB
Created
Weekly downloads
 

Package description

What is bin-check?

The bin-check npm package is used to check if a binary is working by executing it with optional arguments and checking the exit code. It is useful for validating if a binary is correctly installed and operational in the environment where your Node.js application is running.

What are bin-check's main functionalities?

Check if a binary is working

This feature allows you to check if a binary is working by running it with the '--version' argument (or any other argument you wish to use) and returns a promise that resolves with a boolean indicating if the binary works.

const binCheck = require('bin-check');

binCheck('/path/to/binary', ['--version']).then(works => {
  console.log(works ? 'Binary is working!' : 'Binary is not working.');
}).catch(error => {
  console.error('An error occurred:', error);
});

Other packages similar to bin-check

Readme

Source

bin-check Build Status

Check if a binary is working in Node.js by checking its exit code.

Install

npm install bin-check

Usage

var binCheck = require('bin-check');

binCheck('/bin/sh', '--version', function (err, works, msg) {
    console.log(msg);
    // => GNU bash, version 3.2.51(1)-release-(x86_64-apple-darwin13)

    console.log(works);
    // => true
});

API

binCheck(name, cmd, cb)

Check if a binary is working by checking its exit code. Use cmd to test against custom commands. Defaults to --help.

License

MIT License © Kevin Mårtensson

Keywords

FAQs

Last updated on 04 Apr 2014

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