Sha256: 841f51818b64aca7ea0f95b0851ec7a2abb27bee0018ae2906a9805a451ed820
Contents?: true
Size: 344 Bytes
Versions: 22
Compression:
Stored size: 344 Bytes
Contents
module.exports = thunkyp function thunkyp (fn) { let running = null return ready function ready () { if (running) return running const p = fn() if (!(p instanceof Promise)) running = Promise.resolve(p) else running = p running.catch(onerror) return running } function onerror () { running = null } }
Version data entries
22 entries across 21 versions & 7 rubygems