Socket
Socket
Sign inDemoInstall

bin-check

Package Overview
Dependencies
18
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
Weekly downloads
1,490,789
decreased by-5.84%

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

Install

$ npm install bin-check

Usage

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

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

API

binCheck(binary, [arguments])

Returns a Promise for a boolean.

binCheck.sync(binary, [arguments])

Returns a boolean.

binary

Type: string

Path to the binary.

arguments

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

Arguments to run the binary with.

License

MIT © Kevin Mårtensson

Keywords

FAQs

Last updated on 20 Jun 2017

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