Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/runtime.js>unrefTimer

A JavaScript extension package for building strong and modern applications.
Latest
function unrefTimer
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

import { unrefTimer } from "@ayonli/jsext/runtime";

const timer = setTimeout(() => {
    console.log("Hello, World!");
}, 1000);

unrefTimer(timer);