1.0.4 • Published 7 years ago
async-protect v1.0.4
async-protect
Call asynchronous methods at the same time, execute only once, and share the result
var asyncProtect = require('async-protect')
var oldMethod = function (a) {
// return a Promise instance
}
var newMethod = asyncProtect(oldMethod)
newMethod(1)
newMethod(2)