Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 19, 2019
1 parent f2a3556 commit 4bffd2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/stdio.js
@@ -1,15 +1,15 @@
'use strict';
const alias = ['stdin', 'stdout', 'stderr'];

const hasAlias = opts => alias.some(alias => opts[alias] !== undefined);
const hasAlias = opts => alias.some(x => opts[x] !== undefined);

const stdio = opts => {
if (!opts) {
return;
}

if (opts.stdio && hasAlias(opts)) {
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(alias => `\`${alias}\``).join(', ')}`);
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
}

if (typeof opts.stdio === 'string') {
Expand Down

0 comments on commit 4bffd2c

Please sign in to comment.