Licence
MIT
Version
1.0.0
Deps
1
Size
2 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
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.