A utility for checking node environment.
If I should maintain this repo, please
DM me on Twitter if you have questions or suggestions.
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.