geoip-lite2 2.2.1 → 2.2.2
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/geoip-data/city.checksum +1 -1
- package/geoip-data/country.checksum +1 -1
- package/geoip-data/geoip-city-names.dat +0 -0
- package/geoip-data/geoip-city.dat +0 -0
- package/geoip-data/geoip-city6.dat +0 -0
- package/geoip-data/geoip-country.dat +0 -0
- package/geoip-data/geoip-country6.dat +0 -0
- package/minify.js +1 -1
- package/package.json +4 -6
- package/test/index.test.js +5 -5
package/geoip-data/city.checksum
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7f1323724d7f3d37c8dac085f8245b8602e361bbc0add2a978de26e07abfd21a GeoLite2-City-CSV_20241206.zip
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
af69d21b66426a54f08097986017bb295a489f1ea17810d44ae6f0f71d73454f GeoLite2-Country-CSV_20241206.zip
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/minify.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geoip-lite2",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
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",
|
|
@@ -37,11 +37,9 @@
|
|
|
37
37
|
"ipv4",
|
|
38
38
|
"ipv6",
|
|
39
39
|
"location",
|
|
40
|
-
"low latency geoip",
|
|
41
40
|
"maxmind integration",
|
|
42
41
|
"maxmind lite",
|
|
43
42
|
"maxmind",
|
|
44
|
-
"real time ip lookup",
|
|
45
43
|
"region",
|
|
46
44
|
"state"
|
|
47
45
|
],
|
|
@@ -73,10 +71,10 @@
|
|
|
73
71
|
"rimraf": "^6.0.1"
|
|
74
72
|
},
|
|
75
73
|
"devDependencies": {
|
|
76
|
-
"@eslint/js": "^9.
|
|
77
|
-
"globals": "^15.
|
|
74
|
+
"@eslint/js": "^9.16.0",
|
|
75
|
+
"globals": "^15.13.0",
|
|
78
76
|
"jest": "^29.7.0",
|
|
79
|
-
"terser": "^5.
|
|
77
|
+
"terser": "^5.37.0"
|
|
80
78
|
},
|
|
81
79
|
"engines": {
|
|
82
80
|
"node": ">=10.3.0"
|
package/test/index.test.js
CHANGED
|
@@ -44,10 +44,10 @@ describe('GeoIP2', () => {
|
|
|
44
44
|
expect(actual.country).toBe('JP');
|
|
45
45
|
expect(actual.eu).toBe('0');
|
|
46
46
|
expect(actual.timezone).toBe('Asia/Tokyo');
|
|
47
|
-
expect(actual.city).toBe('');
|
|
47
|
+
expect(actual.city).toBe('Tokushima');
|
|
48
48
|
expect(actual.ll).toBeTruthy();
|
|
49
49
|
expect(actual.metro).toBe(0);
|
|
50
|
-
expect(actual.area).toBe(
|
|
50
|
+
expect(actual.area).toBe(500);
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
it('should match data for IPv4 - RU', () => {
|
|
@@ -59,7 +59,7 @@ describe('GeoIP2', () => {
|
|
|
59
59
|
expect(actual.city).toBe('Nerl\'');
|
|
60
60
|
expect(actual.ll).toBeTruthy();
|
|
61
61
|
expect(actual.metro).toBe(0);
|
|
62
|
-
expect(actual.area).toBe(
|
|
62
|
+
expect(actual.area).toBe(20);
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -73,7 +73,7 @@ describe('GeoIP2', () => {
|
|
|
73
73
|
expect(actual.city).toBe('Warsaw');
|
|
74
74
|
expect(actual.ll).toBeTruthy();
|
|
75
75
|
expect(actual.metro).toBe(0);
|
|
76
|
-
expect(actual.area).toBe(
|
|
76
|
+
expect(actual.area).toBe(200);
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
it('should match data for IPv6 - NL ', () => {
|
|
@@ -105,7 +105,7 @@ describe('GeoIP2', () => {
|
|
|
105
105
|
it('should return UTF8 city name', () => {
|
|
106
106
|
const actual = geoIp2.lookup('2.139.175.1');
|
|
107
107
|
expect(actual.country).toBe('ES');
|
|
108
|
-
expect(actual.city).toBe('
|
|
108
|
+
expect(actual.city).toBe('Madrid');
|
|
109
109
|
expect(actual.timezone).toBe('Europe/Madrid');
|
|
110
110
|
});
|
|
111
111
|
|