default-gateway
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -17,8 +17,3 @@ "use strict"; | ||
(stdout || "").trim().split("\n").some(line => { | ||
let target, gateway, _flags, iface; | ||
if (family === "v4") { | ||
[target, gateway, _flags, iface] = line.split(/ +/) || []; | ||
} else { | ||
[target, gateway, _flags, iface] = line.split(/ +/) || []; | ||
} | ||
const [target, gateway, _flags, iface] = line.split(/ +/) || []; | ||
if (dests.includes(target) && gateway && net.isIP(gateway)) { | ||
@@ -25,0 +20,0 @@ result = {gateway: gateway, interface: (iface ? iface : null)}; |
{ | ||
"name": "default-gateway", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Get the default network gateway, cross-platform.", | ||
@@ -5,0 +5,0 @@ "author": "silverwind <me@silverwind.io>", |
8612
153