2023-08-26 06:31:51 +00:00
|
|
|
import { syscall } from "./syscall.ts";
|
|
|
|
|
2023-10-03 12:16:33 +00:00
|
|
|
/**
|
|
|
|
* Implements a very simple (string) key value store for the client.
|
|
|
|
* Generally should only be used to set some client-specific states, such as preferences.
|
|
|
|
*/
|
|
|
|
|
2023-08-26 06:31:51 +00:00
|
|
|
export function set(key: string, value: any): Promise<void> {
|
|
|
|
return syscall("clientStore.set", key, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function get(key: string): Promise<any> {
|
|
|
|
return syscall("clientStore.get", key);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function del(key: string): Promise<void> {
|
|
|
|
return syscall("clientStore.delete", key);
|
|
|
|
}
|