caniuse-yarn

Check if Yarn is available.

Usage no npm install needed!

<script type="module">
  import caniuseYarn from 'https://cdn.skypack.dev/caniuse-yarn';
</script>

README

caniuse-yarn

NPM npm npm npm type definitions pipeline status

Check if Yarn is available.

Installation

npm install caniuse-yarn
# or
yarn add caniuse-yarn
# or
yarn install caniuse-yarn

CLI

You can also install as global package to use CLI.

npm install -g caniuse-yarn
# or
yarn global add caniuse-yarn
caniuse-yarn

Check if Yarn is available.

Options:
  --help, -h     Show help                                             [boolean]
  --version, -v  Show version number                                   [boolean]

Usage

const caniuseYarn = require('caniuse-yarn');

if (caniuseYarn()) {
    console.log('Yarn is available. You can use Yarn.');
} else {
    console.log('Yarn is not available! You cannot use Yarn.');
}

Related