(listArgs)
| 1732 | // |
| 1733 | // |
| 1734 | function normalizeConnectArgs(listArgs) { |
| 1735 | const args = net._normalizeArgs(listArgs); |
| 1736 | const options = args[0]; |
| 1737 | const cb = args[1]; |
| 1738 | |
| 1739 | // If args[0] was options, then normalize dealt with it. |
| 1740 | // If args[0] is port, or args[0], args[1] is host, port, we need to |
| 1741 | // find the options and merge them in, normalize's options has only |
| 1742 | // the host/port/path args that it knows about, not the tls options. |
| 1743 | // This means that options.host overrides a host arg. |
| 1744 | if (listArgs[1] !== null && typeof listArgs[1] === 'object') { |
| 1745 | ObjectAssign(options, listArgs[1]); |
| 1746 | } else { |
| 1747 | ObjectAssign(options, listArgs[2]); |
| 1748 | } |
| 1749 | |
| 1750 | return cb ? [options, cb] : [options]; |
| 1751 | } |
| 1752 | |
| 1753 | function onConnectSecure() { |
| 1754 | const options = this[kConnectOptions]; |
no test coverage detected
searching dependent graphs…