{"size": 243, "ext": "js", "max_stars_repo_path": "src/Svelte/utils/watchable.js", "max_stars_repo_name": "MacFJA/livres", "max_stars_repo_stars_event_min_datetime": "2020-02-13T17:25:39.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-09T21:28:15.000Z", "max_issues_repo_path": "src/Svelte/utils/watchable.js", "max_issues_repo_name": "MacFJA/livres", "max_issues_repo_issues_event_min_datetime": "2018-02-21T13:44:47.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-31T20:24:20.000Z", "max_forks_repo_path": "src/Svelte/utils/watchable.js", "max_forks_repo_name": "MacFJA/livres", "max_forks_repo_forks_event_min_datetime": "2018-12-24T09:02:48.000Z", "max_forks_repo_forks_event_max_datetime": "2018-12-24T09:02:48.000Z"}
{"max_stars_count": 4, "max_issues_count": 11, "max_forks_count": 1, "avg_line_length": 24.3, "max_line_length": 43, "alphanum_fraction": 0.5967078189}
import { beforeUpdate } from "svelte"
import { readable } from "svelte/store"

export function watchable(valueGetter) {
    return readable(valueGetter(), set => {
        beforeUpdate(() => {
            set(valueGetter())
        })
    })
}