パッケージの詳細

@nitra/isenv

nitra936MIT2.0.1

NODE_ENV shortcuts

isdev, isprod, istest

readme

isenv

Maintainability

Installation

$ npm install @nitra/isenv --save

or

$ yarn add @nitra/isenv

Usage with ES Modules

"use strict";

import { isDev, isProd } from "@nitra/isenv";

{
  console.log("is production =", isProd);

  /* ... */

  if (isDev) {
    /* ... */
  }
}

Usage with require

"use strict";

const { isDev, isProd } = reuire("@nitra/isenv");

{
  console.log("is production =", isProd);

  /* ... */

  if (isDev) {
    /* ... */
  }
}

Variables

Available vars

Signature Description
isDev -> boolean True if the env it development
isProd -> boolean True if the env is production
isTest -> boolean True if the env is test

License

This software is released under the MIT License.