@k03mad/ip2geo 2.3.0 → 2.3.1
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 +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# GeoIP lookup
|
|
2
2
|
|
|
3
3
|
— Using [ipwhois.io](https://ipwhois.io/documentation) \
|
|
4
|
-
— Runtime
|
|
5
|
-
— Filesystem infinity cache
|
|
4
|
+
— Runtime + filesystem caching
|
|
6
5
|
|
|
7
6
|
## Global
|
|
8
7
|
|
|
8
|
+
Cache directory = `os.tmpDir() / .ip2geo`
|
|
9
|
+
|
|
9
10
|
```bash
|
|
10
11
|
npm i @k03mad/ip2geo -g
|
|
11
12
|
|
|
@@ -38,7 +39,10 @@ import {ip2geo} from '@k03mad/ip2geo';
|
|
|
38
39
|
|
|
39
40
|
const info = await ip2geo('1.1.1.1', {
|
|
40
41
|
// defaults
|
|
42
|
+
|
|
43
|
+
// current app root
|
|
41
44
|
cacheDir: '.geoip',
|
|
45
|
+
// will be prefixed with the first IP octet
|
|
42
46
|
cacheFileName: 'ips.log',
|
|
43
47
|
cacheFileSeparator: ';;',
|
|
44
48
|
cacheFileNewline: '\n',
|