geoip-lite2 2.1.17 → 2.1.20

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
  <a href="https://cdn.sefinek.net/images/npm/geoip-lite2/banner.jpg" target="_blank" title="Full screen">
3
- <img src="https://cdn.sefinek.net/images/npm/geoip-lite2/banner.jpg" alt="GeoIP-Lite2 v2.1 🗺️ Now even faster!">
3
+ <img src="https://cdn.sefinek.net/images/npm/geoip-lite2/banner.jpg" alt="GeoIP-Lite 2.1 🗺️ Now even faster!">
4
4
  </a>
5
5
  <br>
6
6
  <p>
@@ -1 +1 @@
1
- ee9c1a64512461f9dc3de00a3eae83965bf62f69aefa9d9dd94f15d36e409805 GeoLite2-City-CSV_20231013.zip
1
+ 16c292952e41bc6c80725328360be7bb7a34706b5f0bffd304f57ae3026ac97d GeoLite2-City-CSV_20231020.zip
@@ -1 +1 @@
1
- 76e3213958d6189a933a1491495de2d2a541eb88d351a05dd689a6801408659c GeoLite2-Country-CSV_20231013.zip
1
+ 54605654747efc7135f486dbecca6ffe3cc98247f5cb259c6c3cde305e2d3dae GeoLite2-Country-CSV_20231020.zip
Binary file
Binary file
Binary file
Binary file
Binary file
package/index.d.ts CHANGED
@@ -1,23 +1,30 @@
1
1
  declare module 'geoip-lite2' {
2
- export const cmp: number | any | null
2
+ export const cmp: number | any | null;
3
3
 
4
- export type GeoData = {
4
+ interface GeoIp2Location {
5
5
  range: [number, number];
6
6
  country: string;
7
7
  region: string;
8
- eu: string;
8
+ eu: '0' | '1';
9
9
  timezone: string;
10
10
  city: string;
11
11
  ll: [number, number];
12
12
  metro: number;
13
13
  area: number;
14
- };
14
+ }
15
+
16
+ function lookup(ip: string): GeoIp2Location | null;
17
+ function pretty(ip: string | number): string;
15
18
 
16
- export function lookup(ip: string): GeoData | null;
19
+ function reloadDataSync(): void;
20
+ function reloadData(callback: () => void): void;
21
+ function startWatchingDataUpdate(): void;
17
22
 
18
- export const pretty: (n: string | number | number[]) => string;
19
- export const startWatchingDataUpdate: (callback: () => void) => void;
20
- export const reloadDataSync: () => void;
21
- export const reloadData: (callback: () => void) => void;
22
- export const version: string;
23
+ export {
24
+ lookup,
25
+ pretty,
26
+ reloadDataSync,
27
+ reloadData,
28
+ startWatchingDataUpdate,
29
+ };
23
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geoip-lite2",
3
- "version": "2.1.17",
3
+ "version": "2.1.20",
4
4
  "description": "A light weight native JavaScript implementation of GeoIP API from MaxMind. Improved and faster version by Sefinek.",
5
5
  "keywords": [
6
6
  "city",
@@ -32,7 +32,7 @@
32
32
  "license": "Apache-2.0",
33
33
  "author": "Philip Tellis <philip@bluesmoon.info> (https://bluesmoon.info)",
34
34
  "main": "lib/main.js",
35
- "types": "index.d.ts",
35
+ "typings": "index.d.ts",
36
36
  "directories": {
37
37
  "lib": "lib",
38
38
  "test": "test"
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "jest": "^29.7.0",
71
- "terser": "^5.21.0"
71
+ "terser": "^5.22.0"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=5.10.0"
package/test/other.js ADDED
@@ -0,0 +1 @@
1
+ const e=require('../lib/main.js'),n=e.pretty(34525252);console.log(`version: ${e.version}\npretty: ${n}`);
package/test/version.js DELETED
@@ -1 +0,0 @@
1
- const o=require('../lib/main.js');console.log(o.version);
File without changes
File without changes