speedclimbing/website

View on GitHub
src/utils/mounted.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { onMount } from 'svelte';

export const mounted = {
    subscribe(fn: (_: boolean) => void) {
        fn(false);
        onMount(() => fn(true));
        return () => {};
    }
};