@lesjoursfr/bin-check
TypeScript icon, indicating that this package has built-in type declarations

7.1.6 • Public • Published

npm version QC Checks Tests

bin-check

Check if a binary is working by checking its exit code

Install

npm install @lesjoursfr/bin-check

Usage

import binCheck from "@lesjoursfr/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

/@lesjoursfr/bin-check/

    Package Sidebar

    Install

    npm i @lesjoursfr/bin-check

    Weekly Downloads

    13

    Version

    7.1.6

    License

    MIT

    Unpacked Size

    5.64 kB

    Total Files

    6

    Last publish

    Collaborators

    • e-adrien