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.
 
 
 
 
StackGenVis/frontend/node_modules/base-compose/index.js

55 lines
1.3 KiB

/*!
* base-compose <https://github.com/base/base-compose>
*
* Copyright (c) 2016, Brian Woodward.
* Licensed under the MIT License.
*/
'use strict';
var Compose = require('./lib/compose');
var utils = require('./lib/utils');
/**
* Expose `compose`
*/
module.exports = function(options) {
return function(app) {
/**
* Setup a composition by passing in an array of generators to compose elements.
* If a generator cannot be found, an error will be thrown.
*
* ```js
* app.compose(base, ['a', 'b', 'c'])
* .data()
* .options()
* .helpers()
* .views();
* ```
*
* @name .compose
* @param {Object} `parent` Parent generator to lookup generators.
* @param {String|Array} `names` One or more generator names or instances.
* @return {Object} Returns an instance of `Compose`
* @api public
*/
this.define('compose', function(parent, names) {
if (!this.isGenerator) {
throw new Error('expected the base-generators plugin to be registered');
}
if (parent && typeof parent === 'string' || Array.isArray(parent)) {
return this.compose(this.base, parent);
}
if (!parent) {
parent = this.base;
}
return new Compose(parent, this, utils.arrayify(names));
});
};
};