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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.2
    49
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.2
    49
  • 2.0.1
    0
  • 2.0.0
    0

Package Sidebar

Install

npm i is-command

Weekly Downloads

49

Version

2.0.2

License

MIT

Unpacked Size

3.73 kB

Total Files

5

Last publish

Collaborators

  • ivangabriele