Download src/mocks/should-start-mock-worker.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 239 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/mocks/should-start-mock-worker.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/mocks/should-start-mock-worker.ts
-
curl -L -o should-start-mock-worker.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/mocks/should-start-mock-worker.ts
239 Bytes
| export function shouldStartMockWorker({ | |
| mockApi = import.meta.env.VITE_MOCK_API, | |
| hasWindow = typeof window !== "undefined", | |
| }: { | |
| mockApi?: string; | |
| hasWindow?: boolean; | |
| } = {}): boolean { | |
| return hasWindow && mockApi === "true"; | |
| } | |