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-cli-schema/lib/config/related.js

54 lines
1.2 KiB

'use strict';
var utils = require('../utils');
/**
* Set a value on the `related` property in package.json config.
*
* ```sh
* $ --config=related.highlight:micromatch
* //=> {verb: {related: {hightlight: 'micromatch'}}}
*
* $ --config=related.list:micromatch
* //=> {verb: {related: {list: ['micromatch']}}}
*
* $ --config=related.list:micromatch,generate
* //=> {verb: {related: {list: ['micromatch', 'generate']}}}
* ```
* @cli public
*/
module.exports = function(app) {
return {
type: ['array', 'object', 'string'],
normalize: function(val, key, config, schema) {
if (typeof val === 'undefined') {
return;
}
var highlight;
if (utils.isObject(val) && val.highlight) {
highlight = val.highlight;
if (utils.isObject(val.highlight)) {
highlight = Object.keys(val.highlight)[0];
}
}
if (utils.isObject(val) && val.list) {
val.list = utils.arrayify(val.list);
return val;
}
var obj = {};
obj.list = utils.arrayify(val);
if (utils.isString(highlight)) {
obj.highlight = highlight;
}
config[key] = obj;
return obj;
}
};
};