Comparing version 0.5.0 to 0.5.1
@@ -28,3 +28,3 @@ | ||
if (delim.readInt8(0) === -1 && delim.readInt8(1) === -1 && delim.readInt8(2) === -1) { | ||
if (delim[0] == 255 && delim[1] === 255 && delim[2] === 255) { | ||
this.type = file.readByte(); | ||
@@ -101,2 +101,3 @@ | ||
// TODO: refactor it | ||
// Advance to part of file where database info is stored. | ||
@@ -103,0 +104,0 @@ file.seek(file.length() - 3); |
@@ -322,1 +322,41 @@ var Database = require('./database'), | ||
}; | ||
exports.getDomain = function(ipv4) { | ||
return exports.lookupOrg(ipv4, [DatabaseInfo.DOMAIN_EDITION]); | ||
}; | ||
exports.getDomainV6 = function(ipv6) { | ||
return exports.lookupOrgV6(ipv6, [DatabaseInfo.DOMAIN_EDITION_V6]); | ||
}; | ||
exports.getUserType = function(ipv4) { | ||
return exports.lookupOrg(ipv4, [DatabaseInfo.USERTYPE_EDITION]); | ||
}; | ||
exports.getUserTypeV6 = function(ipv6) { | ||
return exports.lookupOrgV6(ipv6, [DatabaseInfo.USERTYPE_EDITION_V6]); | ||
}; | ||
exports.getRegistrar = function(ipv4) { | ||
return exports.lookupOrg(ipv4, [DatabaseInfo.REGISTRAR_EDITION]); | ||
}; | ||
exports.getRegistrarV6 = function(ipv6) { | ||
return exports.lookupOrgV6(ipv6, [DatabaseInfo.REGISTRAR_EDITION_V6]); | ||
}; | ||
exports.getAccuracyRadius = function(ipv4) { | ||
return exports.lookupOrg(ipv4, [DatabaseInfo.ACCURACYRADIUS_EDITION]); | ||
}; | ||
exports.getAccuracyRadiusV6 = function(ipv6) { | ||
return exports.lookupOrgV6(ipv6, [DatabaseInfo.ACCURACYRADIUS_EDITION_V6]); | ||
}; |
{ | ||
"name": "maxmind", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"homepage": "https://github.com/runk/node-maxmind", | ||
@@ -5,0 +5,0 @@ "description": "IP lookup using Maxmind databases", |
36026843
7782