@open-condo/miniapp-utils
Version:
A set of helper functions / components / hooks used to build new condo apps fast
1 lines • 642 B
Source Map (JSON)
{"version":3,"sources":["../../src/helpers/environment.ts"],"sourcesContent":["/**\n * Check whether it's a server or client environment\n * @example\n * if (!isSSR()) {\n * console.log(window.location.href)\n * }\n */\nexport function isSSR (): boolean {\n return typeof window === 'undefined'\n}\n\n/**\n * Check whether it's development environment or not\n * @example\n * const IS_DEBUG_LOGS_ENABLED = isDebug()\n */\nexport function isDebug (): boolean {\n return process.env.NODE_ENV === 'development'\n}\n"],"mappings":";AAOO,SAAS,QAAkB;AAC9B,SAAO,OAAO,WAAW;AAC7B;AAOO,SAAS,UAAoB;AAChC,SAAO,QAAQ,IAAI,aAAa;AACpC;","names":[]}