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

dev-check

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev-check

Reliable & flexible DEV environment verification

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dev-check

Reliable, flexible and fast DEV environment verification.

Build Status Coverage Status

Features

The library checks for the DEV environment by verifying the current value of process.env.NODE_ENV. And if there is an occurrence of DEV (case-insensitive) in the value, it is recognized as development.

For example, any of the following values are recognized as development:

  • development
  • my-dev
  • This is DEV
  • DeV-123

Installing

$ npm install dev-check

Usage

dynamic usage
var env = require('dev-check');

if(env.isDev) {
    // this is a DEV environment
}

Note that when accessing property isDev, the environment is checked dynamically.

static usage
var isDev = require('dev-check').isDev; // reading environment only once

if(isDev) {
    // this is a DEV environment
}

License

Copyright © 2017 Vitaly Tomilov; Released under the MIT license.

Keywords

FAQs

Package last updated on 03 Aug 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