{"analyzedAt":"2023-01-02T16:36:32.120Z","collected":{"metadata":{"name":"turbo-geoip-country","scope":"unscoped","version":"23.1.0","description":"An updated, performance-focused fork of node-geoip with only country data","keywords":["geo","geoip","ip","ipv4","ipv6","geolookup","maxmind","geolite","country","light","performance","optimized"],"date":"2023-01-02T16:35:47.147Z","author":{"name":"David Burgos","url":"https://ghostboard.io/"},"publisher":{"username":"ghostboard","email":"david@ghostboard.io"},"maintainers":[{"username":"ghostboard","email":"david@ghostboard.io"}],"contributors":[{"name":"Philip Tellis","email":"philip@bluesmoon.info","url":"http://bluesmoon.info/"},{"name":"Arturs Sosins","email":"@ar2rsawseen"},{"name":"David Burgos","email":"@dburgos","url":"https://ghostboard.io"}],"repository":{"type":"git","url":"git://github.com/ghostboard/turbo-geoip-country.git"},"links":{"npm":"https://www.npmjs.com/package/turbo-geoip-country","homepage":"https://github.com/ghostboard/turbo-geoip-country","repository":"https://github.com/ghostboard/turbo-geoip-country","bugs":"https://github.com/ghostboard/turbo-geoip-country/issues"},"license":"Apache-2.0","dependencies":{"async":"^2.6.4","iconv-lite":"^0.4.24","ip-address":"^5.9.4","lazy":"^1.0.11","rimraf":"^2.7.1","yauzl":"^2.9.2"},"devDependencies":{"eslint":"^5.16.0","nodeunit":"^0.11.3"},"releases":[{"from":"2022-12-03T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":0},{"from":"2022-10-04T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":0},{"from":"2022-07-06T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":1},{"from":"2022-01-02T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":3},{"from":"2021-01-02T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":5}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"# turbo-geoip-country\n\nThis is an updated, performance-focused fork of [node-geoip](https://github.com/geoip-lite/node-geoip) with only country data. Inspired by [geoip-ultralight](https://github.com/danielstjules/geoip-ultralight)\n\nThis product uses GeoLite data created by MaxMind, available from [https://www.maxmind.com/](https://www.maxmind.com/)\n\n💡 You would need to create an account and get a license key to update data by yourself\n\n[![Build Status](https://travis-ci.com/ghostboard/turbo-geoip-country.svg?branch=master \"turbo-geoip-country on Travis\")](https://app.travis-ci.com/github/ghostboard/turbo-geoip-country)\n\n## How to install 🎁\n\n```bash\nnpm install turbo-geoip-country --save\n```\n## How to use it 🤖\n\n```javascript\nconst turboGeoip = require('turbo-geoip-country');\n\nconst ip = \"207.97.227.239\";\nconst country = turboGeoip.getCountry(ip);\nconsole.log(country);\n'US'\n\n// Also it works with anonymized ip\nconst ip = \"207.97.227.0\";\nconst country = turboGeoip.getCountry(ip);\nconsole.log(country);\n'US'\n```\n\n## Why `turbo-geoip-country` ⚡️\n\n- 🚀 Get country code (2 letter ISO-3166-1) by IP v4/v6\n- 🔒 Works also with anonymized IP\n- 🔥 Performance focused (see the section below)\n- ✅ Less than 25 MB memory footprint (instead of +110 MB of node-geoip)\n- ⏰ Data updated on 2nd January 2023\n- 📅 Using [Calendar versioning](https://calver.org/)\n- 🌐 Production-ready, used by [Ghostboard.io](https://ghostboard.io)\n- ⚡️ Updated dependencies and 1 removed\n- 🤓 Code reduced and deprecations updated\n\n## Performance 🔥\n\n💡 Based on the average performance of 10 executions of each package on a 2018 Mac Mini i7 6c12t 16GB\n\n| Metric | node-geoip | turbo-geoip-country | delta  |\n| ------- | ------- | ------- | ------- |\n| Startup time | 47 ms | 17 ms | 63.83 % faster |\n| Time to find 1 ip | 7 μs/ip | 4 μs/ip | 42.86 % faster |\n| IP lookups per second | 139534.884 ip/s | 250000.000 ip/s | 44.19 % more ip/s |\n\n\nTest yourself `node test/performance.js`\n\n```bash\nFound 30000 (17030/12970) ips in 120ms (250000.000 ip/s) (4μs/ip)\nTook 17 ms to startup\n```\n\nvs [node-geoip](https://github.com/geoip-lite/node-geoip) `node test/geo-lookup.js`\n\n```bash\nFound 30000 (16917/13083) ips in 215ms (139534.884 ip/s) (7μs/ip)\nTook 47 ms to startup\n```\n\n## How to update the data 🔑\n\nRun `cd node_modules/turbo-geoip-country && npm run-script updatedb license_key=YOUR_LICENSE_KEY`\n\n👉 Replace `YOUR_LICENSE_KEY` with your license key obtained from [maxmind.com](https://support.maxmind.com/account-faq/account-related/how-do-i-generate-a-license-key/). You can create a maxmind account [here](https://www.maxmind.com/en/geolite2/signup)\n\n💡 This takes about 1 minute\n\n## Tests ✅\n\nRun `npm t`\n\n```bash\n> nodeunit test/tests.js\n\n\ntests.js\n✔ testLookup\n✔ testDataIP4\n✔ testDataIP6\n✔ testUpdatedIps\n\nOK: 7 assertions (19ms)\n```\n\n## References\n\n- [Documentation from MaxMind](http://www.maxmind.com/app/iso3166)\n- [ISO 3166 (1 & 2) codes](http://en.wikipedia.org/wiki/ISO_3166)\n- [FIPS region codes](http://en.wikipedia.org/wiki/List_of_FIPS_region_codes)\n\n## Copyright\n\n`geoip-lite` is Copyright 2011-2018 Philip Tellis <philip@bluesmoon.info> and the latest version of the code is\navailable at https://github.com/bluesmoon/node-geoip\n\n## License\n\nThere are two licenses for the code and data.  See the [LICENSE](https://github.com/bluesmoon/node-geoip/blob/master/LICENSE) file for details."},"npm":{"downloads":[{"from":"2023-01-01T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":3},{"from":"2022-12-26T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":9},{"from":"2022-12-03T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":350},{"from":"2022-10-04T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":2796},{"from":"2022-07-06T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":4758},{"from":"2022-01-02T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":6341}],"starsCount":0},"github":{"homepage":"https://npmjs.org/package/turbo-geoip-country","forkOf":"geoip-lite/node-geoip","starsCount":2,"forksCount":0,"subscribersCount":0,"issues":{"count":0,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":true},"contributors":[{"username":"bluesmoon","commitsCount":82},{"username":"dburgos","commitsCount":25},{"username":"ar2rsawseen","commitsCount":23},{"username":"ostseb","commitsCount":8},{"username":"parisholley","commitsCount":5},{"username":"chill117","commitsCount":4},{"username":"jonathanong","commitsCount":4},{"username":"Jimflip","commitsCount":3},{"username":"GUI","commitsCount":2},{"username":"tshemsedinov","commitsCount":2},{"username":"lneveu","commitsCount":2},{"username":"bevacqua","commitsCount":2},{"username":"corollari","commitsCount":2},{"username":"jordanj77","commitsCount":1},{"username":"orktes","commitsCount":1},{"username":"serby","commitsCount":1},{"username":"ctalkington","commitsCount":1},{"username":"michaelficarra","commitsCount":1},{"username":"elcct","commitsCount":1},{"username":"patelatharva","commitsCount":1},{"username":"estliberitas","commitsCount":1},{"username":"echiu64","commitsCount":1},{"username":"ramonsnir","commitsCount":1},{"username":"ecwyne","commitsCount":1},{"username":"steve-gh","commitsCount":1},{"username":"Strajk","commitsCount":1},{"username":"inversion","commitsCount":1},{"username":"64json","commitsCount":1},{"username":"DylanPiercey","commitsCount":1},{"username":"phanindra48","commitsCount":1},{"username":"iinc","commitsCount":1},{"username":"gtebbutt","commitsCount":1},{"username":"santiagoecheverri94","commitsCount":1},{"username":"oliversalzburg","commitsCount":1},{"username":"dtinth","commitsCount":1},{"username":"Surzhynskyi","commitsCount":1},{"username":"tlhunter","commitsCount":1},{"username":"scalder27","commitsCount":1},{"username":"justinpage","commitsCount":1},{"username":"pjm0616","commitsCount":1}],"commits":[{"from":"2022-12-26T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":3},{"from":"2022-12-03T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":3},{"from":"2022-10-04T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":3},{"from":"2022-07-06T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":5},{"from":"2022-01-02T00:00:00.000Z","to":"2023-01-02T00:00:00.000Z","count":10}]},"source":{"files":{"readmeSize":3448,"testsSize":2253},"linters":["eslint"],"outdatedDependencies":{"rimraf":{"required":"^2.7.1","stable":"3.0.2","latest":"3.0.2"},"iconv-lite":{"required":"^0.4.24","stable":"0.6.3","latest":"0.6.3"},"ip-address":{"required":"^5.9.4","stable":"8.1.0","latest":"8.1.0"},"async":{"required":"^2.6.4","stable":"3.2.4","latest":"3.2.4"}}}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.6,"health":0.5,"branding":0},"popularity":{"communityInterest":42,"downloadsCount":932,"downloadsAcceleration":0.838698630136987,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9,"issuesDistribution":0.9}},"score":{"final":0.6111783048982471,"detail":{"quality":0.7771796610682786,"popularity":0.08015761208786083,"maintenance":0.9999121209914636}}}