projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Security update to Drupal 8.4.6
[yaffs-website]
/
node_modules
/
phridge
/
lib
/
lift.js
1
"use strict";
2
3
var slice = Array.prototype.slice;
4
5
function lift(fn) {
6
/**
7
* @this ctx
8
* @returns {Promise}
9
*/
10
return function () {
11
var args = slice.call(arguments);
12
var ctx = this;
13
14
return new Promise(function (resolve, reject) {
15
args.push(function (err, result) {
16
err ? reject(err) : resolve(result);
17
});
18
fn.apply(ctx, args);
19
});
20
};
21
}
22
23
module.exports = lift;