import { writable } from 'svelte/store'

export default function () {
    const users = writable([]);

    async function get() {
        const response = await fetch(`/api/users`)
        users.set(await response.json())
    }

    get();

    return users;
}