Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/iguntur/bin-exists
- Owner: iguntur
- License: mit
- Created: 2016-12-29T05:33:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-08T04:39:30.000Z (over 7 years ago)
- Last Synced: 2024-11-07T18:33:13.625Z (3 months ago)
- Topics: async, bin, binary, exists, lightweight, promise, sync
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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'));
//=> trueconsole.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)