diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..c55cdf8 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +/test/data/ diff --git a/lib/IPAddress.js b/lib/IPAddress.js index 124ea5c..20e199a 100644 --- a/lib/IPAddress.js +++ b/lib/IPAddress.js @@ -1,10 +1,10 @@ 'use strict'; -var IPv6 = require('ip-address').v6; -var IPv4 = require('ip-address').v4; +var Address6 = require('ip-address').Address6; +var Address4 = require('ip-address').Address4; exports.parseIPv4 = function parseIPv4(ip) { - var v4Address = new IPv4.Address(ip); + var v4Address = new Address4(ip); if (!v4Address.isValid()) { throw new Error("Invalid IPv4 address"); } @@ -12,7 +12,7 @@ exports.parseIPv4 = function parseIPv4(ip) { }; exports.parseIPv6 = function parseIPv6(ip) { - var v6Address = new IPv6.Address(ip); + var v6Address = new Address6(ip); if (!v6Address.isValid()) { throw new Error("Invalid IPv6 address"); } diff --git a/package.json b/package.json index d9bd74c..d859a7b 100644 --- a/package.json +++ b/package.json @@ -37,13 +37,13 @@ }, "dependencies": { "big-integer": ">=1.1.5", - "ip-address": "4.0.0" + "ip-address": "^5.8.6" }, "devDependencies": { - "istanbul": "^0.3.13", - "jshint": "2.4.2", - "path": "^0.11.14", - "scotch-tape": "0.2.0" + "istanbul": "^0.4.5", + "jshint": "^2.9.4", + "path": "^0.12.7", + "scotch-tape": "^0.2.1" }, "scripts": { "cover": "istanbul cover --report cobertura --print detail tape -- test/test.js",