Determines the current JavaScript environment context. Useful for branching logic based on the runtime environment.
An object containing the global scope reference and the CONTEXT type enum
const { type } = getContext();if (type === CONTEXT.Browser) { ... } Copy
const { type } = getContext();if (type === CONTEXT.Browser) { ... }
Determines the current JavaScript environment context. Useful for branching logic based on the runtime environment.