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

Function validateHost

lib/_http_client.js:126–133  ·  view source on GitHub ↗
(host, name)

Source from the content-addressed store, hash-verified

124const HTTP_CLIENT_TRACE_EVENT_NAME = 'http.client.request';
125
126function validateHost(host, name) {
127 if (host !== null && host !== undefined && typeof host !== 'string') {
128 throw new ERR_INVALID_ARG_TYPE(`options.${name}`,
129 ['string', 'undefined', 'null'],
130 host);
131 }
132 return host;
133}
134
135class HTTPClientAsyncResource {
136 constructor(type, req) {

Callers 1

ClientRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…