How to use the mquery.Promise function in mquery

To help you get started, we’ve selected a few mquery examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pebble / yieldb / helper.js View on Github external
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);
  };
};

mquery

Expressive query building for MongoDB

MIT
Latest version published 2 years ago

Package Health Score

74 / 100
Full package analysis