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

Function pickIPv4Address

test/parallel/test-inspector-ip-detection.js:25–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25function pickIPv4Address() {
26 for (const i of [].concat(...Object.values(os.networkInterfaces()))) {
27 if (i.family === 'IPv4' && i.address !== '127.0.0.1')
28 return i.address;
29 }
30}
31
32async function test() {
33 const instance = new NodeInstance('--inspect-brk=0.0.0.0:0');

Callers 1

Calls 2

concatMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…