MCPcopy Index your code
hub / github.com/nodejs/node / normalizeConnectArgs

Function normalizeConnectArgs

lib/internal/tls/wrap.js:1734–1751  ·  view source on GitHub ↗
(listArgs)

Source from the content-addressed store, hash-verified

1732//
1733//
1734function 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
1753function onConnectSecure() {
1754 const options = this[kConnectOptions];

Callers 1

wrap.jsFile · 0.85

Calls 1

ObjectAssignFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…