forked from enviPath/enviPy
Current Dev State
This commit is contained in:
24
static/js/ketcher2/node_modules/trivial-deferred/index.js
generated
vendored
Normal file
24
static/js/ketcher2/node_modules/trivial-deferred/index.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
module.exports = Deferred
|
||||
|
||||
var P
|
||||
/* istanbul ignore next */
|
||||
try {
|
||||
P = Promise
|
||||
} catch (er) {
|
||||
try {
|
||||
P = require('bluebird')
|
||||
} catch (er) {
|
||||
throw new Error('this module requires a Promise implementation. ' +
|
||||
'Try installing bluebird.')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Deferred () {
|
||||
this.resolve = null
|
||||
this.reject = null
|
||||
this.promise = new P(function (resolve, reject) {
|
||||
this.reject = reject
|
||||
this.resolve = resolve
|
||||
}.bind(this))
|
||||
}
|
||||
Reference in New Issue
Block a user