Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dryrun

Package Overview
Dependencies
Maintainers
9
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dryrun

Checks the DRY_RUN environment variable

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
increased by577.47%
Maintainers
9
Weekly downloads
 
Created
Source

Dryrun

Downloads version License Build Status

Checks if the DRY_RUN environment variable is set to a truthy value. It considers any value truthy other than: unset, "", "0", "false" and "no".

Usage

Simply install with npm or yarn:

npm install dryrun
yarn add dryrun

To use it, import the isDryRun or shouldPerform functions:

const { isDryRun, shouldPerform } = require('dryrun');
console.log(isDryRun());       // true if DRY_RUN was set
console.log(shouldPerform());  // opposite of isDryRun()

Testing

dryrun comes with two handy functions for testing:

const { resetDryRun, setDryRun } = require('dryrun');

setDryRun(true);  // explicitly activate DRY_RUN
...
resetDryRun();    // reset DRY_RUN to the environment value

FAQs

Package last updated on 30 Nov 2017

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