1.0.0 • Published 4 years ago

is-yarn-installed v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

isYarnInstalled

A ultra-simple module to check if a command-line command exists.

Installation

npm install is-yarn-installed

or if you prefer use yarn:

yarn add is-yarn-installed

usage

You can pass a callback, but for default, a return of the value is defined.

const isYarnInstalled = require('is-yarn-installed');

console.log(isYarnInstalled())
const isYarnInstalled = require('is-yarn-installed');

isYarnInstalled(function (isInstalled) => {
    if (isInstalled) {
        console.log('Is installed!')
    } else {
        console.log('Isnt installed. :(')
    }
})

Thanks

To @mathisonian for all the code to detect if the system have the command installed.