Download node_modules/@tanstack/query-core/src/environmentManager.ts from sitcod3/modul-s: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/spaces/sitcod3/modul-s/resolve/c06e4783a2be21cd7ca9fedf1ede4d4f0156ba3a/node_modules/%40tanstack/query-core/src/environmentManager.ts
- Command line
-
hf download hf://spaces/sitcod3/modul-s@c06e4783a2be21cd7ca9fedf1ede4d4f0156ba3a/node_modules/@tanstack/query-core/src/environmentManager.ts
-
curl -L -o environmentManager.ts https://huggingface.co/spaces/sitcod3/modul-s/resolve/c06e4783a2be21cd7ca9fedf1ede4d4f0156ba3a/node_modules/%40tanstack/query-core/src/environmentManager.ts
582 Bytes
| import { isServer } from './utils' | |
| export type IsServerValue = () => boolean | |
| /** | |
| * Manages environment detection used by TanStack Query internals. | |
| */ | |
| export const environmentManager = (() => { | |
| let isServerFn: IsServerValue = () => isServer | |
| return { | |
| /** | |
| * Returns whether the current runtime should be treated as a server environment. | |
| */ | |
| isServer(): boolean { | |
| return isServerFn() | |
| }, | |
| /** | |
| * Overrides the server check globally. | |
| */ | |
| setIsServer(isServerValue: IsServerValue): void { | |
| isServerFn = isServerValue | |
| }, | |
| } | |
| })() | |