UNPKG

tether

Version:

A client-side library to make absolutely positioned elements attach to elements in the page efficiently.

14 lines (11 loc) 188 B
const deferred = []; export function defer(fn) { deferred.push(fn); } export function flush() { let fn; // eslint-disable-next-line while (fn = deferred.pop()) { fn(); } }