Spaces:
Runtime error
Runtime error
Download src/lib/utils/store.ts from FallnAI/LLM-Inference: direct link, hf CLI and curl.
- Browser
- Download file 351 Bytes
-
https://huggingface.co/spaces/FallnAI/LLM-Inference/resolve/0ff4ef88e52ae018ce84a5c4cc1cd2d14ff35135/src/lib/utils/store.ts
- Command line
-
hf download hf://spaces/FallnAI/LLM-Inference@0ff4ef88e52ae018ce84a5c4cc1cd2d14ff35135/src/lib/utils/store.ts
-
curl -L -o store.ts https://huggingface.co/spaces/FallnAI/LLM-Inference/resolve/0ff4ef88e52ae018ce84a5c4cc1cd2d14ff35135/src/lib/utils/store.ts
351 Bytes
| import { browser } from "$app/environment"; | |
| import { page } from "$app/stores"; | |
| import { readable, type Writable } from "svelte/store"; | |
| export function partialSet<T extends Record<string, unknown>>(store: Writable<T>, partial: Partial<T>) { | |
| store.update(s => ({ ...s, ...partial })); | |
| } | |
| export const safePage = browser ? page : readable(undefined); | |