Server IP : 66.29.132.122 / Your IP : 18.190.253.22 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/self/root/usr/lib/node_modules/npm/node_modules/execa/lib/ |
Upload File : |
'use strict'; const alias = ['stdin', 'stdout', 'stderr']; const hasAlias = opts => alias.some(x => Boolean(opts[x])); module.exports = opts => { if (!opts) { return null; } if (opts.stdio && hasAlias(opts)) { 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') { return opts.stdio; } const stdio = opts.stdio || []; if (!Array.isArray(stdio)) { throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); } const result = []; const len = Math.max(stdio.length, alias.length); for (let i = 0; i < len; i++) { let value = null; if (stdio[i] !== undefined) { value = stdio[i]; } else if (opts[alias[i]] !== undefined) { value = opts[alias[i]]; } result[i] = value; } return result; };