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/stringify-author/index.js

30 lines
662 B

/*!
* stringify-author <https://github.com/jonschlinkert/stringify-author>
*
* Copyright (c) 2014-2015 Jon Schlinkert.
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (author) {
if (typeof author !== 'object') {
throw new Error('expected an author to be an object');
}
var tmpl = {name: ['', ''], email: ['<', '>'], url: ['(', ')']};
var str = '';
if (author.url) author.url = stripSlash(author.url);
for (var key in tmpl) {
if (author[key]) {
str += tmpl[key][0] + author[key] + tmpl[key][1] + ' ';
}
}
return str.trim();
};
function stripSlash(str) {
return str.replace(/\/$/, '');
}