项目作者: iguntur

项目描述 :
Check if the binary exists on system
高级语言: JavaScript
项目地址: git://github.com/iguntur/bin-exists.git
创建时间: 2016-12-29T05:33:53Z
项目社区:https://github.com/iguntur/bin-exists

开源协议:MIT License

下载


bin-exists Build Status Build Status

Check if the binary exists on system

Install

  1. $ npm install --save bin-exists

Usage

  1. const binExists = require('bin-exists');
  2. // async
  3. binExists('node').then(val => {
  4. console.log(val);
  5. //=> true
  6. });
  7. binExists('foo').then(val => {
  8. console.log(val);
  9. //=> false
  10. });
  11. // sync
  12. console.log(binExists.sync('node'));
  13. //=> true
  14. console.log(binExists.sync('foo'));
  15. //=> 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