1
0
silverbullet/plug-api/silverbullet-syscall/clientStore.ts
Zef Hemel 0313565610
Complete redo of content indexing and querying (#517)
Complete redo of data store
Introduces live queries and live templates
2023-10-03 14:16:33 +02:00

19 lines
514 B
TypeScript

import { syscall } from "./syscall.ts";
/**
* 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.
*/
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);
}