tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
12 lines (11 loc) • 470 B
JavaScript
// @ts-nocheck
/**
* Checks if the Firebase Functions are running in the emulator environment.
* This function relies on the environment variable `FUNCTIONS_EMULATOR` to determine
* whether the Firebase Functions are being executed locally in an emulator or in production.
*
* @returns {boolean} `true` if the Firebase Functions are running in the emulator, `false` otherwise.
*/
export default function isEmulator() {
return process.env.FUNCTIONS_EMULATOR;
}