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

Function isIP

lib/internal/net.js:59–63  ·  view source on GitHub ↗

* @param {string} s * @returns {4|6|0}

(s)

Source from the content-addressed store, hash-verified

57 * @returns {4|6|0}
58 */
59function isIP(s) {
60 if (isIPv4(s)) return 4;
61 if (isIPv6(s)) return 6;
62 return 0;
63}
64
65function makeSyncWrite(fd) {
66 return function(chunk, enc, cb) {

Callers 15

constructorMethod · 0.85
lookupAndConnectFunction · 0.85
lookupAndConnectMultipleFunction · 0.85
onconnectionFunction · 0.85
onlookupFunction · 0.85
onlookupallFunction · 0.85
lookupFunction · 0.85
lookupServiceFunction · 0.85
dgram.jsFile · 0.85
doConnectFunction · 0.85
doSendFunction · 0.85

Calls 2

isIPv4Function · 0.85
isIPv6Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…