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 +1 -1
- package/data/city.checksum +1 -1
- package/data/country.checksum +1 -1
- package/data/geoip-city-names.dat +0 -0
- package/data/geoip-city.dat +0 -0
- package/data/geoip-city6.dat +0 -0
- package/data/geoip-country.dat +0 -0
- package/data/geoip-country6.dat +0 -0
- package/index.d.ts +17 -10
- package/package.json +3 -3
- package/test/other.js +1 -0
- package/test/version.js +0 -1
- /package/test/{main.test.js → index.test.js} +0 -0
- /package/test/{one.js → setInterval.js} +0 -0
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-
|
|
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>
|
package/data/city.checksum
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16c292952e41bc6c80725328360be7bb7a34706b5f0bffd304f57ae3026ac97d GeoLite2-City-CSV_20231020.zip
|
package/data/country.checksum
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
54605654747efc7135f486dbecca6ffe3cc98247f5cb259c6c3cde305e2d3dae GeoLite2-Country-CSV_20231020.zip
|
|
Binary file
|
package/data/geoip-city.dat
CHANGED
|
Binary file
|
package/data/geoip-city6.dat
CHANGED
|
Binary file
|
package/data/geoip-country.dat
CHANGED
|
Binary file
|
package/data/geoip-country6.dat
CHANGED
|
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
|
-
|
|
4
|
+
interface GeoIp2Location {
|
|
5
5
|
range: [number, number];
|
|
6
6
|
country: string;
|
|
7
7
|
region: string;
|
|
8
|
-
eu:
|
|
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
|
-
|
|
19
|
+
function reloadDataSync(): void;
|
|
20
|
+
function reloadData(callback: () => void): void;
|
|
21
|
+
function startWatchingDataUpdate(): void;
|
|
17
22
|
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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.
|
|
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
|
-
"
|
|
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.
|
|
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
|