Usuário: neallindsay
- Created: 4061 days ago
- Karma: 684
- const lockify = f => {
let lock = Promise.resolve()
return (...args) => {
const result = lock.then(() => f(...args))
lock = result.catch(() => {})
return result.then(v => v)
}
}
submissions | comments