Skip to content

Commit

Permalink
Trim and filter arg arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarks committed Feb 1, 2016
1 parent 4024daf commit 4502aa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.js
Expand Up @@ -64,7 +64,8 @@ export default function CbioPortal ({ requestOpts = false } = {}) {
* @return {Array}
*/
function parseArray (x) {
return Array.isArray(x) ? x : x.split(',');
x = Array.isArray(x) ? x : x.split(','); //eslint-disable-line no-param-reassign
return x.filter(z => !!z).map(y => y.trim());
}

/**
Expand Down

0 comments on commit 4502aa1

Please sign in to comment.