UNPKG

@storm-stack/utilities

Version:

This package includes various base utility class and various functions to assist in the development process.

31 lines (30 loc) 1.25 kB
/** * Check the current runtime mode of the process * * @param mode - The mode to check the current process's mode against * @param env - An optional environment name to check the current process's mode against * @returns An indicator specifying if the current runtime matches the `mode` parameter */ export declare const isMode: (mode: string, env?: string | undefined) => boolean; /** * The function checks if the code is running in production. * * @param env - An optional environment name to check the current process's mode against * @returns A boolean indicating if the code is running in production. */ export declare const isProduction: (env?: string) => boolean; /** * The function checks if the code is **NOT** running in production. * * @remarks * **Please note:** This function does **not** check if the mode equals 'development' specifically. * * To check for the 'development' mode specifically, run: * * ```typescript * const isDevelopmentSpecifically = isMode("development"); * ``` * @param env - An optional environment name to check the current process's mode against * @returns A boolean indicating if the code is **NOT** running in production. */ export declare const isDevelopment: (env?: string) => boolean;