/usr/lib/nodejs/trivial-deferred/index.js is in node-tap 11.0.0+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 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))
}
|