2.0.1 • Published 5 years ago

@nitra/isenv v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

SignatureDescription
isDev -> booleanTrue if the env it development
isProd -> booleanTrue if the env is production
isTest -> booleanTrue if the env is test

License

This software is released under the MIT License.