mmdb-lib 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -58,15 +58,19 @@ interface TraitsRecord {
58
58
  readonly is_anonymous?: boolean;
59
59
  readonly is_anonymous_proxy?: boolean;
60
60
  readonly is_anonymous_vpn?: boolean;
61
+ readonly is_anycast?: boolean;
61
62
  readonly is_hosting_provider?: boolean;
62
63
  readonly is_legitimate_proxy?: boolean;
63
64
  readonly is_public_proxy?: boolean;
65
+ readonly is_residential_proxy?: boolean;
64
66
  readonly is_satellite_provider?: boolean;
65
67
  readonly is_tor_exit_node?: boolean;
66
68
  readonly isp?: string;
67
69
  readonly mobile_country_code?: string;
68
70
  readonly mobile_network_code?: string;
69
71
  readonly organization?: string;
72
+ readonly static_ip_score?: number;
73
+ readonly user_count?: number;
70
74
  readonly user_type?: 'business' | 'cafe' | 'cellular' | 'college' | 'content_delivery_network' | 'dialup' | 'government' | 'hosting' | 'library' | 'military' | 'residential' | 'router' | 'school' | 'search_engine_spider' | 'traveler';
71
75
  }
72
76
  export interface CountryResponse {
@@ -111,5 +115,5 @@ export interface IspResponse extends AsnResponse {
111
115
  readonly mobile_network_code?: string;
112
116
  readonly organization: string;
113
117
  }
114
- export declare type Response = CountryResponse | CityResponse | AnonymousIPResponse | AsnResponse | ConnectionTypeResponse | DomainResponse | IspResponse;
118
+ export type Response = CountryResponse | CityResponse | AnonymousIPResponse | AsnResponse | ConnectionTypeResponse | DomainResponse | IspResponse;
115
119
  export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- declare type NodeReader = (offset: number) => number;
2
+ type NodeReader = (offset: number) => number;
3
3
  export interface Walker {
4
4
  left: NodeReader;
5
5
  right: NodeReader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmdb-lib",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "homepage": "https://github.com/runk/mmdb-lib",
5
5
  "description": "Maxmind DB (MMDB) Library",
6
6
  "keywords": [
@@ -16,21 +16,20 @@
16
16
  "Uman Shahzad @UmanShahzad"
17
17
  ],
18
18
  "devDependencies": {
19
- "@types/ip-address": "5.8.2",
20
- "@types/jest": "27.0.0",
21
- "@types/node": "16.0.0",
22
- "@types/sinon": "7.5.2",
23
- "@typescript-eslint/eslint-plugin": "^4.4.0",
24
- "@typescript-eslint/parser": "^4.4.0",
25
- "eslint": "^7.10.0",
26
- "ip-address": "6.2.0",
27
- "jest": "^27.4.7",
28
- "prettier": "^2.1.2",
29
- "semantic-release": "^18.0.1",
30
- "sinon": "9.0.1",
31
- "ts-jest": "^27.1.2",
19
+ "@types/ip-address": "6.0.0",
20
+ "@types/mocha": "^10.0.1",
21
+ "@types/node": "20.10.3",
22
+ "@types/sinon": "17.0.2",
23
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
24
+ "@typescript-eslint/parser": "^5.0.0",
25
+ "eslint": "^8.0.0",
26
+ "ip-address": "9.0.5",
27
+ "mocha": "^10.2.0",
28
+ "prettier": "^3.0.0",
29
+ "semantic-release": "^21.0.0",
30
+ "sinon": "17.0.1",
32
31
  "ts-node": "^10.4.0",
33
- "typescript": "4.5.4"
32
+ "typescript": "5.3.2"
34
33
  },
35
34
  "repository": {
36
35
  "type": "git",
@@ -54,7 +53,7 @@
54
53
  "build": "rm -rf lib/* && tsc",
55
54
  "lint": "eslint . --ext .ts",
56
55
  "lint:types": "tsc --noEmit",
57
- "test": "jest",
56
+ "test": "mocha",
58
57
  "test-imports": "node test/imports/commonjs.js && node test/imports/esm.mjs && ts-node test/imports/typescript.ts",
59
58
  "format": "prettier --write src",
60
59
  "prepublish": "npm run build",