Skip to content

Instantly share code, notes, and snippets.

View phultquist's full-sized avatar
🍊

Patrick Hultquist phultquist

🍊
View GitHub Profile
/*
This svelte store is a reference to make super quick live and interactive pieces of code.
See its announcement at https://www.youtube.com/watch?v=A8jkJTWacow&t=18579s
*/
type Options<T> = {
validator: (data: T) => void;
};
export function live<T>(path: string, initialValue: T, options?: Options<T>) {