a2r
Version:
A2R Framework
23 lines (22 loc) • 631 B
JavaScript
;
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;