var nonPrivate = require('../');
var tape = require('tape');

var vps = {
  lo: [
    {address: '127.0.0.1', family: 'IPv4', internal: true},
    {address: '::1', family: 'IPv6', internal: true},
  ],
  eth0: [
    {address: '176.58.117.63', family: 'IPv4', internal: false},
    {
      address: '2a01:7e00::f03c:91ff:fe56:9728',
      family: 'IPv6',
      internal: false,
    },
    {address: 'fe80::f03c:91ff:fe56:9728', family: 'IPv6', internal: false},
  ],
};

var laptop = {
  lo: [
    {address: '127.0.0.1', family: 'IPv4', internal: true},
    {address: '::1', family: 'IPv6', internal: true},
  ],
  enp0s25: [
    {address: '192.168.1.41', family: 'IPv4', internal: false},
    {address: 'fe80::f2de:f1ff:fed9:5c68', family: 'IPv6', internal: false},
    {address: 'fe80::1ae1:738c:3004:75e5', family: 'IPv6', internal: false},
  ],
  wlp3s0: [
    {address: '192.168.1.61', family: 'IPv4', internal: false},
    {address: 'fe80::76e5:bff:fea6:151c', family: 'IPv6', internal: false},
    {address: 'fe80::5a4:f331:d041:9f71', family: 'IPv6', internal: false},
  ],
};

tape('simple', function (t) {
  t.equal(nonPrivate(vps), '176.58.117.63');
  t.equal(nonPrivate(laptop), undefined);
  t.equal(nonPrivate.private(vps), 'fe80::f03c:91ff:fe56:9728%eth0');
  t.equal(nonPrivate.private(laptop), '192.168.1.61');
  t.end();
});

@@ -1,44 +1,48 @@
-var nonPrivate = require('../');%0Avar tap
+const tape = require('tape')%0Aconst nonPrivat
 e = 
@@ -54,20 +54,20 @@
 re('
-tape
+../
 ')
-;
 %0A%0A
-var
+const
  vps
@@ -76,32 +76,33 @@
  %7B%0A  lo: %5B%0A    %7B
+ 
 address: '127.0.
@@ -133,32 +133,33 @@
 ternal: true
+ 
 %7D,%0A    %7B
 address: '::
@@ -138,32 +138,33 @@
 l: true %7D,%0A    %7B
+ 
 address: '::1', 
@@ -185,32 +185,33 @@
 , internal: true
+ 
 %7D,%0A  %5D,%0A  eth0: 
@@ -209,32 +209,33 @@
 %0A  eth0: %5B%0A    %7B
+ 
 address: '176.58
@@ -267,32 +267,33 @@
  internal: false
+ 
 %7D,%0A    %7B%0A      a
@@ -383,32 +383,33 @@
 se,%0A    %7D,%0A    %7B
+ 
 address: 'fe80::
@@ -453,32 +453,33 @@
  internal: false
+ 
 %7D,%0A  %5D,%0A%7D;%0A%0Avar 
@@ -475,14 +475,15 @@
 %5D,%0A%7D
-;
 %0A%0A
-var
+const
  lap
@@ -495,32 +495,33 @@
  %7B%0A  lo: %5B%0A    %7B
+ 
 address: '127.0.
@@ -556,24 +556,25 @@
 al: true
+ 
 %7D,%0A    %7B
 address:
@@ -557,32 +557,33 @@
 l: true %7D,%0A    %7B
+ 
 address: '::1', 
@@ -612,16 +612,17 @@
 al: true
+ 
 %7D,%0A  %5D,%0A
@@ -631,32 +631,33 @@
 enp0s25: %5B%0A    %7B
+ 
 address: '192.16
@@ -692,32 +692,33 @@
 ernal: false
+ 
 %7D,%0A    %7B
 address: 'fe
@@ -697,32 +697,33 @@
 : false %7D,%0A    %7B
+ 
 address: 'fe80::
@@ -771,32 +771,33 @@
 ernal: false
+ 
 %7D,%0A    %7B
 address: 'fe
@@ -776,32 +776,33 @@
 : false %7D,%0A    %7B
+ 
 address: 'fe80::
@@ -846,32 +846,33 @@
  internal: false
+ 
 %7D,%0A  %5D,%0A  wlp3s0
@@ -876,24 +876,25 @@
 3s0: %5B%0A    %7B
+ 
 address: '19
@@ -933,32 +933,33 @@
 ernal: false
+ 
 %7D,%0A    %7B
 address: 'fe
@@ -938,32 +938,33 @@
 : false %7D,%0A    %7B
+ 
 address: 'fe80::
@@ -1015,24 +1015,25 @@
 l: false
+ 
 %7D,%0A    %7B
 address:
@@ -1024,16 +1024,17 @@
 %7D,%0A    %7B
+ 
 address:
@@ -1093,16 +1093,17 @@
 l: false
+ 
 %7D,%0A  %5D,%0A
@@ -1103,17 +1103,16 @@
 ,%0A  %5D,%0A%7D
-;
 %0A%0Atape('
@@ -1178,17 +1178,16 @@
 117.63')
-;
 %0A  t.equ
@@ -1219,17 +1219,16 @@
 defined)
-;
 %0A  t.equ
@@ -1288,17 +1288,16 @@
 8%25eth0')
-;
 %0A  t.equ
@@ -1342,17 +1342,16 @@
 8.1.61')
-;
 %0A  t.end
@@ -1356,10 +1356,8 @@
 nd()
-;
 %0A%7D)
-;
 %0A

format test/index.js