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.
25 lines
505 B
25 lines
505 B
4 years ago
|
'use strict';
|
||
|
|
||
|
var isWhitespace = require('is-whitespace');
|
||
|
|
||
|
module.exports = function(str) {
|
||
|
if (typeof str !== 'string') {
|
||
|
throw new TypeError('expected a string');
|
||
|
}
|
||
|
if (!str) return str;
|
||
|
var lines = str.split('\n');
|
||
|
if (lines.length === 1) {
|
||
|
return str;
|
||
|
}
|
||
|
var start = 0;
|
||
|
for (var i = 0; i < lines.length; i++) {
|
||
|
var line = lines[i];
|
||
|
if (isWhitespace(line) || line === '') {
|
||
|
continue;
|
||
|
}
|
||
|
start = i;
|
||
|
break;
|
||
|
}
|
||
|
return lines.slice(start).join('\n');
|
||
|
};
|