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

to
2.8.0

.nyc_output/2860ed34-20cf-4dc9-aaf1-ce6946b017ca.json

17

lib/decoder.js
'use strict';
var assert = require('assert');
var bigInt = require('big-integer');
var lru = require('tiny-lru');
var decodeBigUint = require('./bigint');
var utils = require('./utils');

@@ -44,2 +44,3 @@

this.cache = lru(opts.cache.max);
this.decodeBigUint = decodeBigUint;
}

@@ -283,18 +284,4 @@

Decoder.prototype.decodeBigUint = function(offset, size) {
var buffer = new Buffer(size);
this.db.copy(buffer, 0, offset, offset + size);
var integer = 0;
var numberOfLongs = size / 4;
for (var i = 0; i < numberOfLongs; i++) {
integer = bigInt(integer).multiply(4294967296).add(buffer.readUInt32BE(i << 2, true));
}
return integer.toString();
};
Decoder.prototype.decodeString = function(offset, size) {
return this.db.utf8Slice(offset, offset + size);
};
{
"name": "maxmind",
"version": "2.7.0",
"version": "2.8.0",
"homepage": "https://github.com/runk/node-maxmind",

@@ -30,9 +30,11 @@ "description": "IP lookup using Maxmind databases",

"devDependencies": {
"eslint": "^2.13.1",
"github-publish-release": "^4.2.1",
"ip-address": "^5.8.8",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"nyc": "^11.9.0",
"sinon": "^5.1.1"
"eslint": "2.13.1",
"github-publish-release": "5.0.1",
"ip-address": "5.8.9",
"istanbul": "0.4.5",
"mocha": "5.2.0",
"nyc": "13.1.0",
"sinon": "7.1.1",
"tslint": "^5.11.0",
"typescript": "^3.1.1"
},

@@ -48,2 +50,3 @@ "repository": {

"main": "index.js",
"typings": "./index.d.ts",
"engines": {

@@ -50,0 +53,0 @@ "node": ">=4.8",

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

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

@@ -80,3 +80,3 @@

watchForUpdates: true,
watchForUpdateNonPersistent: true,
watchForUpdatesNonPersistent: true,
});

@@ -83,0 +83,0 @@ lookup.get('1.1.1.1');

Sorry, the diff of this file is not supported yet