StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
740 B
27 lines
740 B
'use strict';
|
|
|
|
/**
|
|
* For some reason, Promise.promisifyAll does not work on npm.commands :(
|
|
* Promise.promisifyAll(npm.commands);
|
|
* So we have to do it manually.
|
|
* @param {Object} obj
|
|
* @returns {void}
|
|
*/
|
|
function rawPromisify(obj) {
|
|
Object.entries(obj).forEach(([name, method]) => {
|
|
obj[`${name}Async`] = (...args) => {
|
|
return new Promise((resolve, reject) => {
|
|
args.push((err, results) => {
|
|
if (err) {
|
|
reject(err);
|
|
} else {
|
|
resolve(results);
|
|
}
|
|
});
|
|
return method.apply(this, args);
|
|
});
|
|
};
|
|
});
|
|
}
|
|
|
|
module.exports = rawPromisify;
|
|
|