import { unrefTimer } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/runtime.js";
Make the timer not block the event loop from finishing.
NOTE: This function is only available in Node.js, Deno and Bun, in other environments, it's a no-op.
Examples
Example 1
Example 1
import { unrefTimer } from "@ayonli/jsext/runtime";
const timer = setTimeout(() => {
console.log("Hello, World!");
}, 1000);
unrefTimer(timer);