@bconnorwhite/environment
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@bconnorwhite/environment

NPM TypeScript

A utility for checking node environment.

If I should maintain this repo, please ⭐️ GitHub stars

DM me on Twitter if you have questions or suggestions. Twitter


Installation

yarn add @bconnorwhite/environment
npm install @bconnorwhite/environment
pnpm add @bconnorwhite/environment

Usage

import environment, { inProduction, inDevelopment, isProduction, isDevelopment, getEnvironment } from "@bconnorwhite/environment";

// environment: "development" | "production";
// inProduction: boolean;
// inDevelopment: boolean;
// getEnvironment: (env?: string) => "development" | "production";
// isProduction: (env?: string) => boolean;
// isDevelopment: (env?: string) => boolean;

Dev Dependencies

  • autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.

License license

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    0
    • latest

Version History

Package Sidebar

Install

npm i @bconnorwhite/environment

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

4.11 kB

Total Files

8

Last publish

Collaborators

  • bconnorwhite