geoip-lite2 2.1.0 β†’ 2.1.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/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ .idea
2
+ node_modules
3
+ tmp
package/AUTHORS ADDED
@@ -0,0 +1,2 @@
1
+ Philip Tellis <philip@bluesmoon.info> (https://bluesmoon.info)
2
+ Arturs Sosins <@ar2rsawseen>
package/README.md CHANGED
@@ -1,9 +1,17 @@
1
- πŸ—ΊοΈ GeoIP-Lite2 v2.1.0 - Now even faster!
1
+ πŸ—ΊοΈ GeoIP-Lite2 v2.1 - Now even faster!
2
2
  ==========
3
3
  A native Node.js API for the GeoLite data from MaxMind.
4
4
 
5
5
  This product includes GeoLite data created by MaxMind, available from: https://www.maxmind.com
6
6
 
7
+ <a href="https://www.npmjs.com/package/geoip-lite2" target="_blank" title="geoip-lite2 - npm" style="text-decoration:none">
8
+ <img src="https://img.shields.io/npm/dt/geoip-lite2?maxAge=3600" alt="The number of downloads">
9
+ <img src="https://img.shields.io/github/last-commit/sefinek24/geoip-lite2" alt="Last commit">
10
+ <img src="https://img.shields.io/github/issues/sefinek24/geoip-lite2" alt="Issues">
11
+ <img src="https://img.shields.io/github/commit-activity/w/sefinek24/geoip-lite2" alt="Commit activity">
12
+ <img src="https://img.shields.io/github/languages/code-size/sefinek24/geoip-lite2" alt="Code size">
13
+ </a>
14
+
7
15
  πŸš€ Improved GeoIP Module by [Sefinek](https://sefinek.net)
8
16
  ------------
9
17
  This module is an improved and updated edition of [geoip-lite](https://github.com/geoip-lite/node-geoip), thoughtfully designed to meet the latest programming standards.
@@ -1 +1 @@
1
- 13ea583a2a90502c4f64e9050630d640883b01dfaa3a5c8a3277131926e9d88c GeoLite2-City-CSV_20230906.zip
1
+ b1aa2b8de1afdead4f9c01f9101569bd4a7ae8a5efc760977b0156e216902639 GeoLite2-City-CSV_20230908.zip
@@ -1 +1 @@
1
- 1c5f3ce35af7f3dd1fbe41ca343e8d9c737c83cba601d86be929acc7b6d5d843 GeoLite2-Country-CSV_20230906.zip
1
+ 5c009987b9dcc6f71f46f8d1d825ccd8bed11fffdf05b14bf5509289c189aa53 GeoLite2-Country-CSV_20230908.zip
Binary file
Binary file
Binary file
Binary file
Binary file
package/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ declare module 'geoip-lite2' {
2
+ export const cmp: number | any | null
3
+
4
+ export type GeoData = {
5
+ range: [number, number];
6
+ country: string;
7
+ region: string;
8
+ eu: string;
9
+ timezone: string;
10
+ city: string;
11
+ ll: [number, number];
12
+ metro: number;
13
+ area: number;
14
+ };
15
+
16
+ export function lookup(ip: string): GeoData | null;
17
+
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
+ }
package/package.json CHANGED
@@ -1,72 +1,72 @@
1
- {
2
- "name": "geoip-lite2",
3
- "version": "2.1.0",
4
- "description": "A light weight native JavaScript implementation of GeoIP API from MaxMind.",
5
- "keywords": [
6
- "city",
7
- "country",
8
- "fast-geoip",
9
- "geo",
10
- "geoip",
11
- "geolite",
12
- "geolite2",
13
- "geolocation",
14
- "geolookup",
15
- "ip",
16
- "ipv4",
17
- "ipv6",
18
- "location",
19
- "maxmind",
20
- "region",
21
- "state"
22
- ],
23
- "homepage": "https://github.com/sefinek24/geoip-lite2",
24
- "bugs": {
25
- "url": "https://github.com/sefinek24/geoip-lite2/issues"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/sefinek24/geoip-lite2.git"
30
- },
31
- "license": "Apache-2.0",
32
- "author": "Philip Tellis <philip@bluesmoon.info> (https://bluesmoon.info)",
33
- "main": "lib/geoip.js",
34
- "types": "index.d.ts",
35
- "directories": {
36
- "lib": "lib",
37
- "test": "test"
38
- },
39
- "files": [
40
- "lib/",
41
- "data/",
42
- "test/",
43
- "scripts/"
44
- ],
45
- "scripts": {
46
- "eslint": "eslint .",
47
- "minify-linux": "bash _Minify/linux.bash",
48
- "minify-win": "powershell.exe -ExecutionPolicy Bypass .\\_Minify\\windows.ps1",
49
- "test": "mocha test/main.js",
50
- "up": "ncu -u -x chalk && npm install && npm update && npm audit fix",
51
- "updatedb": "node scripts/updatedb.js",
52
- "updatedb-debug": "node scripts/updatedb.js debug",
53
- "updatedb-force": "node scripts/updatedb.js force"
54
- },
55
- "dependencies": {
56
- "adm-zip": "^0.5.10",
57
- "async": "^3.2.4",
58
- "chalk": "4.1.2",
59
- "iconv-lite": "0.6.3",
60
- "ip-address": "^8.1.0",
61
- "lazy": "1.0.11",
62
- "rimraf": "^5.0.1"
63
- },
64
- "devDependencies": {
65
- "eslint": "^8.48.0",
66
- "mocha": "^10.2.0",
67
- "terser": "^5.19.4"
68
- },
69
- "engines": {
70
- "node": ">=5.10.0"
71
- }
72
- }
1
+ {
2
+ "name": "geoip-lite2",
3
+ "version": "2.1.2",
4
+ "description": "A light weight native JavaScript implementation of GeoIP API from MaxMind.",
5
+ "keywords": [
6
+ "city",
7
+ "country",
8
+ "fast-geoip",
9
+ "geo",
10
+ "geoip",
11
+ "geolite",
12
+ "geolite2",
13
+ "geolocation",
14
+ "geolookup",
15
+ "ip",
16
+ "ipv4",
17
+ "ipv6",
18
+ "location",
19
+ "maxmind",
20
+ "region",
21
+ "state"
22
+ ],
23
+ "homepage": "https://github.com/sefinek24/geoip-lite2",
24
+ "bugs": {
25
+ "url": "https://github.com/sefinek24/geoip-lite2/issues"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/sefinek24/geoip-lite2.git"
30
+ },
31
+ "license": "Apache-2.0",
32
+ "author": "Philip Tellis <philip@bluesmoon.info> (https://bluesmoon.info)",
33
+ "main": "lib/geoip.js",
34
+ "types": "index.d.ts",
35
+ "files": [
36
+ "data/",
37
+ "lib/",
38
+ "scripts/",
39
+ "test/",
40
+ ".gitignore",
41
+ "AUTHORS",
42
+ "index.d.ts",
43
+ "LICENSE"
44
+ ],
45
+ "scripts": {
46
+ "eslint": "eslint .",
47
+ "minify-linux": "echo \"Not finished yet >:\"",
48
+ "minify-win": "powershell.exe -ExecutionPolicy Bypass .\\_Minify\\windows.ps1",
49
+ "test": "mocha test/main.js",
50
+ "up": "ncu -u -x chalk && npm install && npm update && npm audit fix",
51
+ "updatedb": "node scripts/updatedb.js",
52
+ "updatedb-debug": "node scripts/updatedb.js debug",
53
+ "updatedb-force": "node scripts/updatedb.js force"
54
+ },
55
+ "dependencies": {
56
+ "adm-zip": "^0.5.10",
57
+ "async": "^3.2.4",
58
+ "chalk": "4.1.2",
59
+ "iconv-lite": "0.6.3",
60
+ "ip-address": "^8.1.0",
61
+ "lazy": "1.0.11",
62
+ "rimraf": "^5.0.1"
63
+ },
64
+ "devDependencies": {
65
+ "eslint": "^8.49.0",
66
+ "mocha": "^10.2.0",
67
+ "terser": "^5.19.4"
68
+ },
69
+ "engines": {
70
+ "node": ">=5.10.0"
71
+ }
72
+ }