pausableWatch
Pausable watch
Demo
Usage
<script>
import { pausableWatch } from "svelte-legos";
import { writable } from "svelte/store";
const source = writable("");
const { isActive, pause, resume, stop } = pausableWatch(
source,
(newVal, oldVal) => console.log(newVal, oldVal)
);
// $isActive => reactive value
</script>