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.
31 lines
835 B
31 lines
835 B
/*!
|
|
* is-valid-app (https://github.com/jonschlinkert/is-valid-app)
|
|
*
|
|
* Copyright (c) 2016, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var utils = require('./utils');
|
|
|
|
module.exports = function(app, name, types) {
|
|
if (typeof name !== 'string') {
|
|
throw new TypeError('expected plugin name to be a string');
|
|
}
|
|
|
|
// if `app` is not a valid instance of `Base`, or if `app` is a valid
|
|
// instance of Base by not one of the given `types` return false
|
|
if (!utils.isValid(app, types)) {
|
|
return false;
|
|
}
|
|
|
|
// if the `name` has already been registered as a plugin, return false
|
|
if (utils.isRegistered(app, name)) {
|
|
return false;
|
|
}
|
|
|
|
var debug = utils.debug('base:generate:' + name);
|
|
debug('initializing from <%s>', (module.parent && module.parent.id) || __dirname);
|
|
return true;
|
|
};
|
|
|