mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Updated mongoose
This commit is contained in:
51
node_modules/mongoose/lib/promise_provider.js
generated
vendored
Normal file
51
node_modules/mongoose/lib/promise_provider.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var MPromise = require('./promise');
|
||||
|
||||
/**
|
||||
* Helper for multiplexing promise implementations
|
||||
*
|
||||
* @api private
|
||||
*/
|
||||
|
||||
var Promise = {
|
||||
_promise: MPromise
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the current promise constructor
|
||||
*
|
||||
* @api private
|
||||
*/
|
||||
Promise.get = function() {
|
||||
return Promise._promise;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the current promise constructor
|
||||
*
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Promise.set = function(lib) {
|
||||
if (lib === MPromise) {
|
||||
return Promise.reset();
|
||||
}
|
||||
Promise._promise = require('./ES6Promise');
|
||||
Promise._promise.use(lib);
|
||||
require('mquery').Promise = Promise._promise.ES6;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets to using mpromise
|
||||
*
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Promise.reset = function() {
|
||||
Promise._promise = MPromise;
|
||||
};
|
||||
|
||||
module.exports = Promise;
|
Reference in New Issue
Block a user