Socket
Socket
Sign inDemoInstall

bin-check

Package Overview
Dependencies
52
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
Maintainers
1
Install size
556 kB
Created

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 by checking its exit code

Install

$ npm install --save bin-check

Usage

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

binCheck('/bin/sh', ['--version'], function (err, works) {
	console.log(works);
	//=> true
});

API

binCheck(binary, command, callback)

binary

Type: string

Path to the binary.

command

Type: array
Default: ['--help']

Commands to run the binary with.

callback(err, works)

Type: function

works is a boolean which returns true if the binary is working correctly.

License

MIT © Kevin Mårtensson

Keywords

FAQs

Last updated on 16 Jun 2015

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