node-ipdox 1.0.3 → 1.0.4

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
@@ -18,7 +18,7 @@ import { IPDox } from "node-ipdox";
18
18
  const ipdox = new IPDox({
19
19
  cacheMaxItems: 5000,
20
20
  cacheMaxAge: 43200000,
21
- maxRetries: 10,
21
+ maxRetries: 10
22
22
  });
23
23
 
24
24
  ipdox
@@ -69,6 +69,7 @@ export interface IPDOXResponse {
69
69
  isTOR: boolean; // Boolean indicating if the IP address is a TOR node (might be undefined)
70
70
  isProxy: boolean; // Boolean indicating if the IP address is a proxy (might be undefined)
71
71
  };
72
+ timeZone: string; // Time zone
72
73
  source: string; // Source API
73
74
  }
74
75
  ```
package/dist/ipdox.js CHANGED
@@ -115,6 +115,7 @@ class IPDox {
115
115
  isp: response.data.isp,
116
116
  proxy: response.data.proxy,
117
117
  isHosting: response.data.hosting,
118
+ timeZone: response.data.timezone,
118
119
  source: "ip-api.com"
119
120
  };
120
121
  this.cacheResponse(ip, formattedResponse);
@@ -141,6 +142,7 @@ class IPDox {
141
142
  isp: response.data.isp,
142
143
  proxy: response.data.proxy,
143
144
  isHosting: response.data.hosting,
145
+ timeZone: response.data.timeZones[0],
144
146
  source: "freeipapi.com"
145
147
  };
146
148
  this.cacheResponse(ip, formattedResponse);
@@ -167,6 +169,7 @@ class IPDox {
167
169
  isp: response.data.connection.isp,
168
170
  proxy: false,
169
171
  isHosting: false,
172
+ timeZone: response.data.timezone.id,
170
173
  source: "ipwho.is"
171
174
  };
172
175
  this.cacheResponse(ip, formattedResponse);
@@ -191,6 +194,7 @@ class IPDox {
191
194
  longitude: response.data.longitude,
192
195
  zip: response.data.postal,
193
196
  isp: response.data.org,
197
+ timeZone: response.data.timezone,
194
198
  source: "ipapi.co"
195
199
  };
196
200
  this.cacheResponse(ip, formattedResponse);
@@ -16,6 +16,7 @@
16
16
  * @property {boolean} proxyInfo.isVPN Is the IP address a VPN?
17
17
  * @property {boolean} proxyInfo.isTOR Is the IP address a TOR node?
18
18
  * @property {boolean} proxyInfo.isProxy Is the IP address a proxy?
19
+ * @property {string} timeZone The time zone
19
20
  * @property {string} source The source of the data
20
21
  */
21
22
  export interface IPDOXResponse {
@@ -34,5 +35,6 @@ export interface IPDOXResponse {
34
35
  isTOR: boolean;
35
36
  isProxy: boolean;
36
37
  };
38
+ timeZone?: string;
37
39
  source: string;
38
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-ipdox",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "node-ipdox is a Node.js library for GeoIP lookup, leveraging various free GeoIP APIs. It provides a unified response format and incorporates local caching to minimize duplicate requests.",
5
5
  "author": "Mikel Calvo <contact@mikecalvo.net> (www.mikelcalvo.net)",
6
6
  "keywords": [
@@ -31,12 +31,12 @@
31
31
  "url": "git+https://github.com/mikelcalvo/node-ipdox.git"
32
32
  },
33
33
  "dependencies": {
34
- "axios": "1.6.8",
35
- "lru-cache": "^10.2.0"
34
+ "axios": "1.7.2",
35
+ "lru-cache": "^10.2.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "20.12.7",
39
- "prettier": "3.2.5",
38
+ "@types/node": "20.14.2",
39
+ "prettier": "3.3.2",
40
40
  "typescript": "^5.4.5"
41
41
  }
42
42
  }