Socket
Socket
Sign inDemoInstall

is-yarn-global

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-yarn-global

Check if installed by yarn globally without any `fs` calls


Version published
Weekly downloads
3.7M
decreased by-14.98%
Maintainers
1
Weekly downloads
 
Created

What is is-yarn-global?

The is-yarn-global npm package is a utility that helps you determine if a package was installed globally using Yarn. This can be useful for scripts and tools that need to behave differently based on the installation method.

What are is-yarn-global's main functionalities?

Check if a package is installed globally with Yarn

This feature allows you to check if the current package was installed globally using Yarn. The code sample demonstrates how to use the is-yarn-global package to log a message based on the installation method.

const isYarnGlobal = require('is-yarn-global');

if (isYarnGlobal()) {
  console.log('This package was installed globally with Yarn.');
} else {
  console.log('This package was not installed globally with Yarn.');
}

Other packages similar to is-yarn-global

FAQs

Package last updated on 25 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc