Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mmdb-lib

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mmdb-lib - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

7

lib/decoder.d.ts
/// <reference types="node" />
import { Cache } from './types';
interface Cursor {
value: any;
offset: number;
}
export default class Decoder {

@@ -9,3 +13,3 @@ telemetry: Record<string, any>;

constructor(db: Buffer, baseOffset?: number, cache?: Cache);
decode(offset: number): any;
decode(offset: number): Cursor;
decodeFast(offset: number): any;

@@ -26,1 +30,2 @@ private decodeByType;

}
export {};

2

lib/decoder.js

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

get: () => undefined,
set: () => undefined
set: () => undefined,
};

@@ -34,0 +34,0 @@ const cursor = (value, offset) => ({ value, offset });

@@ -18,1 +18,2 @@ /// <reference types="node" />

}
export * from './reader/response';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -68,2 +78,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

exports.default = Reader;
__exportStar(require("./reader/response"), exports);
//# sourceMappingURL=index.js.map

@@ -16,6 +16,6 @@ "use strict";

const hex = (v) => {
v = parseInt(v, 10).toString(16);
return v.length === 2 ? v : '0' + v;
const h = parseInt(v, 10).toString(16);
return h.length === 2 ? h : '0' + h;
};
const parseIPv6 = (ip) => {
const parseIPv6 = (input) => {
const addr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];

@@ -25,7 +25,7 @@ let i;

let chunk;
if (ip.indexOf('.') > -1) {
ip = ip.replace(/(\d+)\.(\d+)\.(\d+)\.(\d+)/, (match, a, b, c, d) => {
const ip = input.indexOf('.') > -1
? input.replace(/(\d+)\.(\d+)\.(\d+)\.(\d+)/, (match, a, b, c, d) => {
return hex(a) + hex(b) + ':' + hex(c) + hex(d);
});
}
})
: input;
const [left, right] = ip.split('::', 2);

@@ -32,0 +32,0 @@ if (left) {

@@ -8,3 +8,3 @@ /// <reference types="node" />

readonly languages: string[];
readonly description: any;
readonly description: string;
readonly ipVersion: number;

@@ -11,0 +11,0 @@ readonly nodeCount: number;

{
"name": "mmdb-lib",
"version": "1.1.0",
"version": "1.2.0",
"homepage": "https://github.com/runk/mmdb-lib",

@@ -21,8 +21,11 @@ "description": "Maxmind DB (MMDB) Library",

"@types/sinon": "7.5.2",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"eslint": "^7.10.0",
"ip-address": "6.2.0",
"jest": "26.1.0",
"prettier": "^2.1.2",
"semantic-release": "17.1.1",
"sinon": "9.0.1",
"ts-jest": "26.1.1",
"tslint": "6.1.0",
"typescript": "3.9.6"

@@ -50,5 +53,6 @@ },

"build": "rm -rf lib/* && tsc",
"lint": "echo 'skipping...'",
"lint": "eslint . --ext .ts",
"lint:types": "tsc --noEmit",
"test": "jest",
"format": "prettier --write src",
"prepublish": "npm run build",

@@ -55,0 +59,0 @@ "semantic-release": "semantic-release"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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