UNPKG

@zodash/wait-until

Version:

micro service hub for service registry and discovery

12 lines (11 loc) 271 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.waitUntil = void 0; function waitUntil(fn, ms) { let it = setTimeout(fn, ms); return () => { clearTimeout(it); it = null; }; } exports.waitUntil = waitUntil;