UNPKG

@eolme/vma-router

Version:
15 lines (14 loc) 307 B
class Scheduler { constructor() { this._promise = Promise.resolve(); } nextTick(fn) { const p = this._promise; return fn ? p.then(fn) : p; } setTick(promise) { this._promise = promise; } } export { Scheduler }; export default Scheduler;