UNPKG

a2r

Version:
23 lines (22 loc) 631 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setForceServerSimulation = void 0; let forceServerSimulation = false; /** * Allows you to disable client detection * @param {boolean} value True to force Server Side Simulation */ const setForceServerSimulation = (value) => { forceServerSimulation = value; }; exports.setForceServerSimulation = setForceServerSimulation; /** * Checks if the script is running on the client side */ const isClient = () => { if (forceServerSimulation) { return false; } return typeof window === 'object'; }; exports.default = isClient;