开发者社区> 镜像站> NPM> bin-check
bin-check
Check if a binary is working
Last updated 3 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bin-check 
SYNC missed versions from official npm registry.

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

Current Tags

  • 4.1.0                                ...           latest (3 years ago)

14 Versions

  • 4.1.0                                ...           3 years ago
  • 4.0.1                                ...           4 years ago
  • 4.0.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.5                                ...           7 years ago
  • 0.1.4                                ...           7 years ago
  • 0.1.3                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 47
This Week 5,671
This Month 4,239
Last Day 1,296
Last Week 7,454
Last Month 31,474
Dependencies (2)
Dev Dependencies (2)