diff --git a/lib/ip.js b/lib/ip.js index 4b2adb5..0df8b8e 100644 --- a/lib/ip.js +++ b/lib/ip.js @@ -100,7 +100,7 @@ function _normalizeFamily(family) { if (family === 6) { return 'ipv6'; } - return family ? family.toLowerCase() : 'ipv4'; + return family ? family.toString().toLowerCase() : 'ipv4'; } ip.fromPrefixLen = function (prefixlen, family) {