Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iguntur/bin-exists

Check if the binary exists on system
https://github.com/iguntur/bin-exists

async bin binary exists lightweight promise sync

Last synced: about 1 month ago
JSON representation

Check if the binary exists on system

Awesome Lists containing this project

README

        

# bin-exists [![Build Status](https://travis-ci.org/iguntur/bin-exists.svg?branch=master)](https://travis-ci.org/iguntur/bin-exists) [![Build Status](https://ci.appveyor.com/api/projects/status/github/iguntur/bin-exists?branch=master&svg=true)](https://ci.appveyor.com/project/iguntur/bin-exists)

> Check if the binary exists on system

## Install

```bash
$ npm install --save bin-exists
```

## Usage

```js
const binExists = require('bin-exists');

// async
binExists('node').then(val => {
console.log(val);
//=> true
});

binExists('foo').then(val => {
console.log(val);
//=> false
});

// sync
console.log(binExists.sync('node'));
//=> true

console.log(binExists.sync('foo'));
//=> false
```

## API

### binExists(input)

Returns promise for an input value

### binExists.sync(input)

Returns boolean for an input value

#### input

Type: `string`

Required: `true`

Input command name

## License

MIT © [Guntur Poetra](http://guntur.starmediateknik.com)