UNPKG

vui-design

Version:

A high quality UI Toolkit based on Vue.js

17 lines (13 loc) 216 B
const pending = []; const next = function() { const fn = pending.shift(); if (fn) { fn(next); } }; export default function queue(fn) { pending.push(fn); if (pending.length == 1) { next(); } };