Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function then(resolve, reject) {
var promise = new mquery.Promise(function(success, error) {
fn(function(err, res) {
promise = resolve = reject = fn = null;
if (err) return error(err);
success(res);
});
});
return promise.then(resolve, reject);
};
};