UNPKG

@nent/core

Version:

Functional elements to add routing, data-binding, dynamic HTML, declarative actions, audio, video, and so much more. Supercharge static HTML files into web apps without script or builds.

4 lines 282 B
/*! * NENT 2022 */ class s{constructor(){this.mutex=Promise.resolve()}lock(){let s=()=>{};return this.mutex=this.mutex.then((()=>new Promise(s))),new Promise((t=>{s=t}))}async dispatch(s){const t=await this.lock();try{return await Promise.resolve(s())}finally{t()}}}export{s as M}