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

Function channelFromMap

lib/diagnostics_channel.js:304–318  ·  view source on GitHub ↗
(nameOrChannels, name, className)

Source from the content-addressed store, hash-verified

302}
303
304function channelFromMap(nameOrChannels, name, className) {
305 if (typeof nameOrChannels === 'string') {
306 return channel(`tracing:${nameOrChannels}:${name}`);
307 }
308
309 if (typeof nameOrChannels === 'object' && nameOrChannels !== null) {
310 const channel = nameOrChannels[name];
311 assertChannel(channel, `nameOrChannels.${name}`);
312 return channel;
313 }
314
315 throw new ERR_INVALID_ARG_TYPE('nameOrChannels',
316 ['string', 'object', className],
317 nameOrChannels);
318}
319
320class BoundedChannelScope {
321 #context;

Callers 2

constructorMethod · 0.85
constructorMethod · 0.85

Calls 2

channelFunction · 0.85
assertChannelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…