is-command
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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…
}

Readme

Keywords

Package Sidebar

Install

npm i is-command

Weekly Downloads

21

Version

2.0.2

License

MIT

Unpacked Size

3.73 kB

Total Files

5

Last publish

Collaborators

  • ivangabriele