Download mobile/src/utils/TextEditorStore.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/utils/TextEditorStore.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/src/utils/TextEditorStore.ts
-
curl -L -o TextEditorStore.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/utils/TextEditorStore.ts
474 Bytes
| // Simple store for passing text editor values back | |
| class TextEditorStore { | |
| private pendingValue: {key: string; value: string} | null = null | |
| setPendingValue(key: string, value: string) { | |
| this.pendingValue = {key, value} | |
| } | |
| getPendingValue(): {key: string; value: string} | null { | |
| const value = this.pendingValue | |
| this.pendingValue = null // Clear after reading | |
| return value | |
| } | |
| } | |
| export const textEditorStore = new TextEditorStore() | |