New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

maxmind

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmind - npm Package Compare versions

Comparing version 4.3.1 to 4.3.2

15

lib/index.js

@@ -25,3 +25,3 @@ "use strict";

const utils_1 = __importDefault(require("./utils"));
exports.open = async (filepath, opts, cb) => {
const open = async (filepath, opts, cb) => {
assert_1.default(!cb, utils_1.default.legacyErrorMessage);

@@ -33,3 +33,3 @@ const database = await fs_1.default.readFile(filepath);

const cache = tiny_lru_1.default((opts && opts.cache && opts.cache.max) || 6000);
let reader = new mmdb_lib_1.default(database, { cache });
const reader = new mmdb_lib_1.default(database, { cache });
if (opts && !!opts.watchForUpdates) {

@@ -56,5 +56,5 @@ if (opts.watchForUpdatesHook &&

}
const updateDatabase = await fs_1.default.readFile(filepath);
const updatedDatabase = await fs_1.default.readFile(filepath);
cache.clear();
reader = new mmdb_lib_1.default(updateDatabase, { cache });
reader.load(updatedDatabase);
if (opts.watchForUpdatesHook) {

@@ -67,8 +67,11 @@ opts.watchForUpdatesHook();

};
exports.openSync = () => {
exports.open = open;
const openSync = () => {
throw new Error(utils_1.default.legacyErrorMessage);
};
exports.init = () => {
exports.openSync = openSync;
const init = () => {
throw new Error(utils_1.default.legacyErrorMessage);
};
exports.init = init;
exports.validate = ip_1.default.validate;

@@ -75,0 +78,0 @@ __exportStar(require("mmdb-lib"), exports);

22

package.json
{
"name": "maxmind",
"version": "4.3.1",
"version": "4.3.2",
"homepage": "https://github.com/runk/node-maxmind",

@@ -29,3 +29,3 @@ "description": "IP lookup using Maxmind databases",

"dependencies": {
"mmdb-lib": "1.2.0",
"mmdb-lib": "1.3.0",
"tiny-lru": "7.0.6"

@@ -35,12 +35,12 @@ },

"@types/ip-address": "6.0.0",
"@types/jest": "26.0.15",
"@types/node": "10.17.5",
"@types/sinon": "9.0.8",
"ip-address": "7.0.1",
"jest": "26.6.1",
"sinon": "9.2.0",
"ts-jest": "26.4.2",
"@types/jest": "26.0.23",
"@types/node": "14.17.1",
"@types/sinon": "10.0.1",
"ip-address": "7.1.0",
"jest": "26.6.3",
"sinon": "11.1.0",
"ts-jest": "26.5.6",
"tslint": "6.1.3",
"typescript": "4.0.3",
"semantic-release": "17.2.1"
"typescript": "4.2.4",
"semantic-release": "17.4.3"
},

@@ -47,0 +47,0 @@ "repository": {

@@ -1,2 +0,2 @@

# node-maxmind [![Build Status](https://api.travis-ci.org/runk/node-maxmind.svg?branch=master)](https://travis-ci.org/runk/node-maxmind)
# node-maxmind

@@ -3,0 +3,0 @@ Javascript module for Geo IP lookup using Maxmind binary databases (aka mmdb or geoip2).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc