2.0.2 • Published 5 years ago

is-command v2.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

is-command

Npm Package Travis CI Status

Check if a CLI command is available whithin the current working directory.

Installation

npm install is-command

Usage

const isCommand = require('is-command');

isCommand('aCommand')
  .then((is) => {
    if (!is) {
      // aCommand does not exists. Do something about it…
    }
  });

});

or:

import commandExists from 'is-command';

const is = await isCommand('aCommand')

if (!is) {
  // aCommand does not exists. Do something about it…
}