node-ipdox 1.0.1 → 1.0.3

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
@@ -16,10 +16,10 @@ npm install node-ipdox --save
16
16
  import { IPDox } from "node-ipdox";
17
17
 
18
18
  const ipdox = new IPDox({
19
- cacheMaxItems = 1000,
20
- cacheMaxAge = 43200000,
21
- maxRetries: 10
22
- });
19
+ cacheMaxItems: 5000,
20
+ cacheMaxAge: 43200000,
21
+ maxRetries: 10,
22
+ });
23
23
 
24
24
  ipdox
25
25
  .doxIP({ ip: "8.8.8.8" })
package/dist/ipdox.js CHANGED
@@ -41,8 +41,8 @@ class IPDox {
41
41
  * @returns {Promise<IPDOXResponse | undefined>} - Promise of the response or undefined
42
42
  * @memberof IPDox
43
43
  */
44
- doxIP({ ip }) {
45
- return __awaiter(this, void 0, void 0, function* () {
44
+ doxIP(_a) {
45
+ return __awaiter(this, arguments, void 0, function* ({ ip }) {
46
46
  // Check that the ip is valid
47
47
  if (!ip || ip === "") {
48
48
  return undefined;
@@ -51,7 +51,6 @@ class IPDox {
51
51
  if (this.cache.has(ip)) {
52
52
  const cachedResponse = this.cache.get(ip);
53
53
  if (cachedResponse) {
54
- console.log(`Cache hit for IP: ${ip}`);
55
54
  return cachedResponse;
56
55
  }
57
56
  }
@@ -99,7 +98,6 @@ class IPDox {
99
98
  }
100
99
  cacheResponse(ip, response) {
101
100
  this.cache.set(ip, response);
102
- console.log(`Cached response for IP: ${ip}`);
103
101
  }
104
102
  fetchIPHyphenAPIDotCom(ip) {
105
103
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-ipdox",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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.2",
35
- "lru-cache": "^10.1.0"
34
+ "axios": "1.6.8",
35
+ "lru-cache": "^10.2.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "20.10.1",
39
- "prettier": "3.1.0",
40
- "typescript": "^5.3.2"
38
+ "@types/node": "20.12.7",
39
+ "prettier": "3.2.5",
40
+ "typescript": "^5.4.5"
41
41
  }
42
42
  }