{"version":3,"file":"isServer-DLHcrQUl.cjs","names":[],"sources":["../src/predicates/is/isServer.ts"],"sourcesContent":["/** ---------------------------------------------------------\n * * ***Environment Predicate: `isServer`.***\n * ----------------------------------------------------------\n * **Detects whether the current code is executing in a\n * **non-browser JavaScript runtime** (server-side) rather\n * than in a web browser.**\n *\n * ---\n * @description\n * It simply checks for the absence of key browser globals like\n * [**`window`**](https://developer.mozilla.org/docs/Web/API/Window/window) and\n * [**`document`**](https://developer.mozilla.org/docs/Web/API/Window/document).\n *  - *If those globals aren’t present, we treat the runtime as a server environment.*\n *\n * ---\n * @returns {boolean}\n *  * ***true**  – Code is executing on the `server`.*\n *  * ***false** – Code is executing in a `browser`.*\n *\n * ---\n * @example\n * if (isServer()) {\n *   console.log(\"Running on a server-side runtime\");\n * } else {\n *   console.log(\"Running in a browser\");\n * }\n */\nexport const isServer = (): boolean => {\n  return typeof window === \"undefined\" || typeof document === \"undefined\";\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,iBAA0B;CACrC,OAAO,OAAO,WAAW,eAAe,OAAO,aAAa;AAC9D"}
