1.0.1 • Published 4 years ago
promise-protect v1.0.1
promise-protect
Protect promise-returning functions from being called more than once in parallel.
Written during this twitter exchange.
USAGE
const protect = require('promise-protect')
protect(fn, 'name', some, args).then(result => {})
// won't call fn until the last one resolves
protect(fn, 'name', other, args).then(otherResult => {})