{"_id":"ip3country","_rev":"34-e1f62e6dc5a3faefa46bc9abaaf72e42","name":"ip3country","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"ip3country","version":"1.0.0","author":"","license":"ISC","_id":"ip3country@1.0.0","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"d6560451e28cd9da137d3c9dd02bcba2ca0597a3","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-1.0.0.tgz","fileCount":6,"integrity":"sha512-eF0WTzCFahdmL05klJEaaKpZt/WS+d4ptc994tFtTiVA7tX0i4HmRYaDcsnp8cOoLj0uD/FAgtQtHCT2W8WeBw==","signatures":[{"sig":"MEQCIEyh8t2Q6l4O+GbThKsIj13QPO4ew2SbztR/9aehGzbgAiAUYy9CKR+c0TbaN7E/BjP6bwVKa3cnDn1C6BhJaLCBEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":423385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkdCvCRA9TVsSAnZWagAAhsIP+QDdkl4KeNX8MXJkZHmh\njG8LYH67eYPx+xVeOKeoO4aS5PcaaA/VgyAgUawgPKtn5V7oKmjOrVB2F6E7\nGjXDtQ6xO9agfGOE+rxgq18ABGpqqPUr9C0I7LOzkM9w7tNzvPsQt7ekxkaE\njXe1qjWq1LuewaqG2gm6K38EgLuTYpir7Nh4zPi7oVBYTeyrmDMcGYzf8SEy\n0Hoq/wwboDoM5XaJlFPfYquRz+92kncXN49Q88hZjr8wH3s8zRjM4B2YjJtq\n6u/1RSig2ZT43OCzI6XfBgNaxyp3mXlUquKKak4x5SOu2RHcMP5jhIOtkKq5\nunNduq/m3MVf5JXYCKV82hJm6RVB0HbqGipA8d/f7HM55NLBvvvJ/tCNzUwn\nRH2ymisLdpGUZ9oT24CMpQLRP1CvWoAN0hVlgeJ+soD1mPY/G6Xv1+syK2Nu\nsjfON04d6sL9ciA7FMc73JVtweX2Olb4R9+Nz/ZjupVn6tkeV8LXrMoykKCh\nfhdflWO5gJxspSXiYR8Y6m40QXXNT+OVh3XSMQeLaxaNdablW3Z8j/+h/0sX\neVV9nMvjbNdWaxiXnSGNY7lWZj12VpMBfvG7yE93lHLlkzQOICw7L5m4710Q\nHLTzfh8w6iUJ7+BriGR4zLeuN39zcnOHLfmgWepbmzMmqMRpRi44YjRmGh9Z\noZ2y\r\n=NpoP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c460b10c314a5d4c5527b0de81bed4690b2afd3a","scripts":{"test":"node src/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_1.0.0_1620168878544_0.05531462829703537","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"ip3country","version":"1.0.1","author":"","license":"ISC","_id":"ip3country@1.0.1","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"e5b869fb21e3d7edd1866687700099ee76e662e3","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-1.0.1.tgz","fileCount":6,"integrity":"sha512-5larpkLgvVXPjjqtJsIMCV7Y3/V2ALIRMk6yzxbd3FNbKF+xAdjPDtSYqTjXKw3HX4VDTL88pM8MSB3hceF6WA==","signatures":[{"sig":"MEYCIQDCizeZLsCrpC/LMC26WhWj1d7LvnKJl4uow2+1LjqAdwIhAISGP1vychFh4A8OhG6c5cwLzPpo8a2xM3Pw595KXGgr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":423541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkdk8CRA9TVsSAnZWagAA7ZUP/2tOzF0ggsL65cSvCOM+\noQKS72/8EL04VPUOOoVEA27fR+b9x4BLvXlZoKwUoELvCPNGKw8fFBDzQ71I\nheNWmBh7pdExbr2G2E0gjVGg+8EPiLpF4DSLYcWhxUf3agekKP+cZ2LqDS3m\nEOgzmuJO7WTkcQ6z+ACyxX9Dkod5CWMMVm/pgWppramcGRkARIBL+EKvCorT\nCx5lSu9jrU71ZNDhwEWddErN/vFWTyYmJbdVACwin169av4gI1l3iGQduse+\n3OY9lgW4+lvAiYVmhntC67qw8qgObVnfxegLZqKt/nsLuKnESDXZWK1LMvuX\n/YGGdxtfk2t+nq40x2Xo5oly0IdgsBo5gOFbMim2VscIMYR5Qz6i3D6O+RNr\n8JC1tv4Owlk3cuqctIcBhCiJcUpS/c7rGX9627O9DUrWSJ1ztOm8lyOslhGm\nw43y8ltYsl68F9geUkjzuf1mCl9spzP+ELvNL/RHGMvzSCxs6M7ykNftszOz\n/65YEromVbZ5vaI2y7Ssmfqe77tMxD8IIsKvhKrX6soP4aKCaoOX6C9XdUWe\n4jolOnpDTvz7yVoylp5m6Jz8uqniHwlGlkSotK8rt9PMhUbI9SgCv3vGqYKU\nCGMoPldak8jV2XttaURWO7Cej67CHOOKmxlHpE4rt7oj+77SepbqbwcI7ddt\nKvsg\r\n=GAzz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/CountryLookup.js","gitHead":"16fcb08f029e120b7e5833b56a6a04c0aa596faa","scripts":{"test":"node src/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_1.0.1_1620171068219_0.623844274410777","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"ip3country","version":"1.0.2","author":"","license":"ISC","_id":"ip3country@1.0.2","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"253d3da5de3cd9916d0a2cce1c641af22288f0a5","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-1.0.2.tgz","fileCount":6,"integrity":"sha512-X6r3di5jnugqk6QB4HKuiWWlnwFk1TUcfC9Xq/oVOKlwuE1Ccc9D8uO66GN6g9JH7L86OExms8yIJ7HBG9QFvw==","signatures":[{"sig":"MEUCIHYuaZ9EwWneqrmlLWSnHMwCp3u7am9nQQMZ0koneRsAAiEAjqv2GEr+dEvTn1+6xWZ/Q96FJC9Q+yVUCAkz2f7vYdA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":423682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkeCPCRA9TVsSAnZWagAAmqwP/Aq8zUI+oy47678xJIQe\nd/MOI0JKPRZckx028sIVXd1KNcAF0hO84npSnD7gvEDB+z3r7ZF2Ots6fy6U\nPDcHsxjr3TO5QpT7RC9axNKlNkHeLJ1LaTduSw8V4RbWGyAbSMmcVzOlvub+\nsm6FRSqTkgGH3Zu0mE9ISifSphLJrI6BPG66kNStBOE10v3GNCwjJK5lgL7v\nuVkbGnI0xndVvfz/MCmUi+AwR0FrjwmjU65kFWUi+pSii2qAZz+H9/ohIwJz\ndWuXafc4me++Ba0OrLWxzkR5EBddkw/wjv6opplzcENMa95+f4h4EhiP4xn8\naKjWfkOZe5cLgcV9oAHDSUqUQ51ajlRYxHKRG2KzafV4NxmHk6Ee6FrIIRQ+\nu1Jz30NKYEnXijwo16/T0F90baB1kesDvtc1AdGZuACyx0hCKaTezqij3kVL\nAtVu50wKfNRQ89pZdzCPvXZbaP8fxYUMXkChJrqK+k7/YWRohTUqh/tn2WAP\nTUHRmXbzjkMPCKP9r23kwlqFDqEcYNmlw1hEIGM9RM2x4nAndmv27nycgJud\nzV636Ca6kaYLeaTvFkIoFDyqfK5aVrdvFEVqaIULeJhUaKzFESfPUgMnoYVT\nEASn5jU1clvCvUGm+J1ahoBQOnLqT/Kfzeg1REbLZ4/11q8XpP1hbB6xOS7T\nmRoJ\r\n=hGZj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/CountryLookup.js","gitHead":"d673c807c756c74fcbc96a1564fa0d01383a4911","scripts":{"test":"node src/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_1.0.2_1620172942530_0.043570354062138605","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"ip3country","version":"2.0.0","author":"","license":"ISC","_id":"ip3country@2.0.0","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"5e6ad415b6070e809ea0015b6623c03a7fbb0c16","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-2.0.0.tgz","fileCount":7,"integrity":"sha512-gEFTLVXHFXB8HtH0d9j5tWAETx8Rr8eGenKTTl50d6jXt5UXEl8/spB1POb4Q2ut+qqyNbZEYht6gtGj3JQdpA==","signatures":[{"sig":"MEQCIB3kGJp+BhMiXZnJNbwDB6gi9SImpZKHAkz/RKFWncl3AiAIm/74L7C+DLtBkgDE8JJfi0AgEjMutvaDsme9qCs0Zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":425886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzMJCRA9TVsSAnZWagAA5n4P/RUUkmAcPrUGEb3gnEiO\nz9VkGgYeEhWjX67i57IVf7IddblOAfiI3pINDk4yfTxeZHS7cDadvGn8EpE2\naopJkuxLNt4wCX2pNC1AkHsL+33gXw88KwHv62bHh83JCAf9p+ozPV0xYhwg\n9A08wAWAVlcwf2DqIriWDSCT6Vjdz/jDtWUISKK1bESVZDTqh6Cju25lSZS6\nqJMoOYGRq+9nTu2l1QS8/DOOvDgbC1vu+y6ld1vQ1Mj+Qm/Y2jVcKLhMWEZQ\nhgAPvhgFUO3zJke08Ubv972RB2Y/FAAwhT3GP4891xZPZRkYFIK9JkovusG/\nt0EMLUtVvzgeoAmvdeZD9NEyeSe4+FkMKQhE82gr6pJZsE8U8MeVw4vs6qfE\nY97KyLWPYs0KSwbiHuzIQePvELBZZerdwFihIbhRD/LStUWdqfReKaFrImBe\n0l/jkh33bxx9IbBysUG1YFSe7abKGqmUZc3eq20S5N3ePvda3RBkhke0/VkA\niy5yL55YNykDmvKy4PsTBjw3MDeKWZUznijKsXqNkPsQAyOZqBUhC20jfmH4\nwcSVFaVH7+xLOKeri7IKIHMRfsZ1lWOjZPW0dTmgr5T5Io273erciHq0iQVF\nAt4n/tkddmoU2cjnqzAL6p/ZH4FS8dS/DxxeWVbYFaLk99GXpH8vryqyGuHW\n1CRp\r\n=a77q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","gitHead":"02ada072b52e371e79836c3816ae42e00b120865","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_2.0.0_1620259592411_0.1516212075564447","host":"s3://npm-registry-packages"}},"2.0.1-beta.0":{"name":"ip3country","version":"2.0.1-beta.0","author":"","license":"ISC","_id":"ip3country@2.0.1-beta.0","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"13ad73f54abbf826d042fdedc8b66cc8ac5099d5","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-2.0.1-beta.0.tgz","fileCount":8,"integrity":"sha512-Z9ksIBRVzUl77UOFWAItIV7e60QHMHEAx3oqs+tL81JfneIY0SmDiZMw+gd1D7g4iHOPjpjyn6Psogev7YXdww==","signatures":[{"sig":"MEQCIGyzlYUHUCS+8HtIYqsNtEOwiY5KJAPMDYZnC74fyD9TAiBUo3gJpOMHgZzozSLtTCvX5OZEiy4diIaLdFgmuDMRTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":425952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmXrCCRA9TVsSAnZWagAAzNgQAJ5a4GAOw2VRO/oTa+F6\ncdr3C56KQ2UUy5zJaO8B5IfUgHs9F0fX9vsedUZ37OVghregfODRhOyBG2iA\nePjjpzJKCPDlz109Np92JPrV1UCxaAo4pMzxaggdGdlj63HgTdohQr5oux5a\nmeDKLTjxbnSA4JkiawifGZTOSnSxiDXJTKDDxmQxLOXeu5byWfyRUZ3IqDGx\ne7Lusb2ZxC4TcBDDhiFW+lA7FhIcmdPi1+L8luxueHwjWl3vJUBAXUft/Gre\n+j9DnK6Ml/7TwKvWn4L2EStBBT5O3HzuVQMiI4M3vYkFhasMZXvrYVaynb2P\nPpzMyskZkcU1I/9WhDOnKarkAfORH9MnVr2XfXU2JfmOaBdvkYpXnuSNHgB7\nbHBTFICw/Uex6/5M1EN1LEmkeJjLZn1dIBowwM9kXhS/jZYF0jW7Dp/WK9ME\n3xf6uI7LqguCPK66PsIaB2LyFlV1GNBwlpXfrauIRrNjQ1Ic51pH3fJ7w+JC\nj0dAdKHdGFSEimF3nfZN2VNPQ+1igLN5vRCNaLvYCMgmJ9rftncjAM0n3NTg\ncI4ivB9ng9g1HIEZBIrj93QU1TWv6COT5loYBfxwH8pdCw/jLN5lZ39P6Swk\nCQaoKvJ00uvzoay5kEaCNBEI/9DNrlIc8o2mhpwj/X4MnEI+6TjH30XGT/aN\nU0VX\r\n=lGnP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","readme":"# ip3country\n\nThis is a zero-dependency, super small, IP address to 2-letter [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) lookup library. There are already several libraries available, but none met our requirements for binary size and speed.\n\nThis project in its entirety is <450KB, compared to most alternatives out there that are north of 40MB (but they provide a lot more features).\n\nThe database used in this project is compacted from [IP2Location](https://lite.ip2location.com/database/ip-country). Their DB1.LITE edition is provided under CCA, with the attribution below:\n\n---\n\n**NOTE**\n\nThis site or product includes IP2Location LITE data available from <a href=\"https://lite.ip2location.com\">https://lite.ip2location.com</a>.\n\n---\n\n## Usage\n\n```bash\n$ npm install ip3country\n```\n\n```js\n// Setup\nconst ip3country = require(\"ip3country\");\n\nawait ip3country.init();\n\n// Or if you want sync\n// ip3country.initSync();\n\n// Lookup using ip4 str\nip3country.lookupStr(\"123.45.67.8\"); // 'KR'.\n\n// Lookup using numeric ip\nconsole.log(ip3country.lookupNumeric(2066563848));\n```\n\n## Accuracy\n\n`ip3country`'s accuracy is dependent on IP2Location LITE's accuracy. In our experience, for country lookups, it is accurate enough for most applications.\n\nIP2Location publishes accuracy reports here: https://www.ip2location.com/data-accuracy\n\nThere's also this third party report available: https://www.cl.cam.ac.uk/~nz247/publications/JSAC2011-Geolocation.pdf\n\n## Name\n\nAll variants of \"ip2country\" were already taken in npm, so we decided to step it up.\n","gitHead":"1bafc37c6d4a496ca826a48b901422c695d7dddb","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/ip3country_2.0.1-beta.0_1620671170141_0.6910468606288458","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"ip3country","version":"3.0.0","author":"","license":"ISC","_id":"ip3country@3.0.0","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"bbf40187269a7c3c97cd8b1e614670f247baf525","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-3.0.0.tgz","fileCount":6,"integrity":"sha512-28LKoF+gCqyHT77TwiZ+uyWipZYQMd2pAdmh2fpsNH6Zkv+vO3Tb4ygvZJ/ZJDZKYbuFQ/gsutegBzlFweytQw==","signatures":[{"sig":"MEQCIHq/DnoYQpthP3cMC5Log5Y/26vypE8pz6b4j8vOb/HtAiASvKLDOs4b3YFo9ETzbxCR2u5qQsV92YmTD8ZSeyps2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":474628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmhxZCRA9TVsSAnZWagAA/E4P/j497UKjZaWAKfdZyA6L\nUIcXfFwsK+q6ASdzSjOaVaXfb9+FCMDA9V4UUtEHNnCR4pL2K1K2TgHowASo\nJoWItjoj3+l1YOmyvjywY94DiSzq4d8XVTHHUDoEJ5nqFLd7UYeKAV43Pu2i\nqe6g3fOEMs6cN14K4RgXU23i4VkIu8yLSe/eNu87cYhZIN53mFmpoXMMIEuT\nRI0/FYTk7QEMGCkuqGuPf8No7YRyWvKkT9SMH4jIbBmgD1hqdF3NkWPnFSls\n3AY5Tzqp1mdfWAWwuVatBAtpZ/11Y5S7We1XPiUDiATnsfCFbvvSVh3hf7Np\n5G29MW6kxeXrMFhaPEe0vGGb/pbJC2oEXmfgydutZQHsvihvG2ftn6AGXfSK\n+21vn9b/MHAESn6ub6b95YSdp/H/CqgZKUV4tpONVkNOEXeGYAUCEi9rpDSK\n+72xtTr5xRKkD0fRxIUh7Qe99UlkSNT77GUoywAg1na5bzAn8OdxWE/oC8Ia\nqhFv2C7fjFKEPZdUjHDhHEBozw65s3M77HakPL09iYcPVY6VgbAztSsarPbA\nRT0m78kENCYo1bvClOwkQBfQldJ+l/pChYxxkcwzrqOT/7VmbT3d0NPyhWa6\n4jGtusDwhiioKLSTOC2OZVy4rQvIchyA1MI5q0XEypbX9lRDJkktc+igYapZ\ngQ4e\r\n=jAJq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","gitHead":"74bac6250eb11721e8fcfeb0fa519651d88b8497","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_3.0.0_1620712536468_0.23105175164357705","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"ip3country","version":"4.0.0","author":"","license":"ISC","_id":"ip3country@4.0.0","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"f088936ec418f5bd55ef6dba9ea5ee838ab0a5cd","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-4.0.0.tgz","fileCount":6,"integrity":"sha512-BHiP5JrD0r7bloiRQ35DiFO34og8RRtQUQNqNDJbpp+T3e7eah9cyX93VSGLwgxOb7+trZo5xzK3mTgBK0Szbg==","signatures":[{"sig":"MEYCIQC9Hw1ex2HYM8EshZA7Z5Ws5nfIFAqmmcbDwRYOSJLfJwIhAPkM/VVPG2KmZ6LE4gmGcSKo6hVNLCkMRPdN8pXiqdGX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9liZCRA9TVsSAnZWagAAzecP/2ikIKZ+RWx0xFEoN8h5\nf2GWPt1JVh1KpHTekEuDDrDO9hYd09Mj2i6mH0t8iHA8jObU6ovup70p57pp\na4Xi+dPIqr8Vj6lM5LoAevabDNRlcLgFxJcFoyA8klZZgRxlKlFkuTkdD11H\no0HDeYsRBoO0bXCo5hEp8vMqHFangKzhWMzreZaS3sSp8S0p9T4QBOmY32QG\nFRtwbbPU1olujrEEf2NeoyXXqLBr96XAsRozE8s9v7HA5l35DkKuSyCBk+jC\n4ElyZzrTLxSy7SrqHTAjBKS5U66J5KXavtwVA5EOw7oDW8x4Pc89ditHhgSx\non9RNrXKlWwZ8UE9ERfaW1G13UmwZkfjx/AyuNieqq4rnIC1Ap9945/sDVbs\nuezLm/ozlDV4uNaFeA62ct1kvPvddjIapPuGr2nqOSjICDZm5Sn5Lo0bhB+G\nZKQ9jsbZ0V/1NAKOuMiOqK+0SuEz68P31uYLOit9w+bn5aFDQQCjny5U93k6\nEouG25rpMf6PfVz7itzLHwAB5i9mwYrv3J3rvUNGVTdqHvxChZnllRd7jK7V\nToAiK/8gQ4jMEXiP++hrQ5YOV5C6iDGSkjNnYbwP65VjLDSPzryk+ayKTDse\nLfS1NHIrPrjmATEMT7U72uDT/w4c6VB5MEnBkMtnhu3+yoXn8yxHaTblwFbE\ntqGW\r\n=GTWb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","gitHead":"648d6aa2d9845071913dfd46a1e82b18594350fd","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.7.6","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_4.0.0_1626757273250_0.07684944909520297","host":"s3://npm-registry-packages"}},"5.0.0-beta.1":{"name":"ip3country","version":"5.0.0-beta.1","author":"","license":"ISC","_id":"ip3country@5.0.0-beta.1","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"f41cd43037b772ca46aaf853d9f71fa5f72f7d98","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-5.0.0-beta.1.tgz","fileCount":6,"integrity":"sha512-SdE/FGrgek+y/ZQamkhoUz1k52Yx6oxvwQOEWAQCrY+PIcSOnAw8LAorTJYgEypFszn1Ug/B4dQGErZibOK4WQ==","signatures":[{"sig":"MEUCIDLiSHLLe6C8wb+8aGEBf7A9l9x4qexYXQGXK3vX6aZZAiEAgp7MRk1KGbMnrfhU4hcVdOCCLlmvSRwgUPuuuQxQ2Fw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":476083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQh+RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmooYw//ZgYLSNmioZgjLzASxIZ15RWctG8zWEvYCfI3yg7+WXa9b/7r\r\nBvmnATiH8YxKeBoSTIroVsdCiJmlAMOOBDWUMjAwPP8q0ZJ4qUZAKRPjQPzd\r\nOZ5gLRUR+CJyqKYEUalU2/HMZ7KqWx8kO0baEzwXmzJiUcN9dJi6qkN9SaIS\r\ntptLMQPPjy/p7M4zhtay9RUmWIw+hyDwc0c7F14jK+UldDtBmcESMC7sp7j4\r\nl4piDHuufiY7LzgjpdaUyCSyPaa91lYIeZDeIn/uUgS2AI2qkd79Jep9Nu6d\r\n2xd45HX8hCF1Q6+qyV9EEcRy1RKHPLeiq+YUzDGZu10N7MWl2ZC8WSiMPfOm\r\nrj6dLnHyrAn/0vNpTp0LTHc9jvWOv5xg5T+ehrJjz8BTs776nt3tJefYMB9H\r\n4oQJiYBPNSZqR8zvWwgD0NGEIHW7SpZ0ErBtRKoBM/XkfFajp/HsTHsTGYMD\r\n5gxQbgJKsfP2wQZnSOJxr/KeFpEXsOb2+rvP2st8nxRgDHcurLCH/FFP4Q/Q\r\nCGrY0kkVIlGpJ5h6Kmd5lgoiwRdVq6gd0YNc73RAf9P+YnzCNZE0Bjfh94u6\r\ntSTtCtKTNsI+CQWNnRYPpGDHs8bJSiWblVTprjy96esilt0SPivskaY+5tKX\r\njt5oB1xD9b2XxjKxF4tWG4ihG4t4DFPc+Yo=\r\n=EsXo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","readme":"[![npm version](https://badge.fury.io/js/ip3country.svg)](https://badge.fury.io/js/ip3country) [![install size](https://packagephobia.com/badge?p=ip3country)](https://packagephobia.com/result?p=ip3country) [![tests](https://github.com/statsig-io/ip3country/actions/workflows/tests.yml/badge.svg)](https://github.com/statsig-io/ip3country/actions/workflows/tests.yml)\n\n# ip3country\n\nThis is a zero-dependency, super small, IP address to 2-letter [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) lookup library. There are already several libraries available, but none met our requirements for binary size and speed.\n\nThis project in its entirety is <300KB, compared to most alternatives out there that are north of 40MB (but might provide more than just countries).\n\n(Other languages: Python: https://github.com/statsig-io/ip3country-py, Go: https://github.com/statsig-io/ip3country-go, Ruby: https://github.com/statsig-io/ip3country-ruby, Kotlin: https://github.com/statsig-io/ip3country-kotlin, C#/.Net: https://github.com/statsig-io/ip3country-dotnet)\n\nThe database used in this project is compacted from [IP2Location](https://lite.ip2location.com/database/ip-country). Their DB1.LITE edition is provided under CCA, with the attribution below:\n\n---\n\n**NOTE**\n\nThis site or product includes IP2Location LITE data available from <a href=\"https://lite.ip2location.com\">https://lite.ip2location.com</a>.\n\n---\n\n## Usage\n\n```bash\n$ npm install ip3country\n```\n\n```js\n// Setup\nconst ip3country = require(\"ip3country\");\n\nip3country.init();\n\n// Lookup using ip4 str\nip3country.lookupStr(\"123.45.67.8\"); // 'KR'.\n\n// Lookup using numeric ip\nconsole.log(ip3country.lookupNumeric(2066563848));\n```\n\n## Accuracy\n\n`ip3country`'s accuracy is dependent on IP2Location LITE's accuracy. In our experience, for country lookups, it is accurate enough for most applications.\n\nIP2Location publishes accuracy reports here: https://www.ip2location.com/data-accuracy\n\nThere's also this third party report available: https://www.cl.cam.ac.uk/~nz247/publications/JSAC2011-Geolocation.pdf\n\n## Binary data\n\nTo make this library easy to consume, we're using [btoj](https://github.com/statsig-io/btoj) to transform the necessary binary data into a js module that can be imported like any other module. You won't need to list `ip3country` as an external in your build process.\n\nWe're currently using brotli compression via [NodeJS's `zlib` library](https://nodejs.org/api/zlib.html#zlib_zlib_brotlicompresssync_buffer_options), which won't work in Browser environments. If you want `ip3country` on a browser, check version `3.0.0` (and feel free to publish `ip3country-browser`).\n\n## Name\n\nAll variants of \"ip2country\" were already taken in npm, so we decided to step it up.\n\n## Motivation\n\nAt [Statsig](https://www.statsig.com), we needed a library to evaluate location-based conditions on Feature Gates (Feature Flags). We use ip3country to power country-level rollouts or A/B tests for new features.\n","gitHead":"2a8a20cf0eba3da06269effcea73ad1fd558cf8f","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.5.3","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/ip3country_5.0.0-beta.1_1648500625062_0.6942570810366764","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"ip3country","version":"5.0.0","author":"","license":"ISC","_id":"ip3country@5.0.0","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"f1394b050c51ba9c10cc691c8eb240bba3d7177a","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-5.0.0.tgz","fileCount":6,"integrity":"sha512-lcFLMFU4eO1Z7tIpbVFZkaZ5ltqpeaRx7L9NsAbA9uA7/O/rj3RF8+evE5gDitooaTTIqjdzZrenFO/OOxQ2ew==","signatures":[{"sig":"MEQCIEcGd4DNiGtHzBuwlF8GJbrxXZuBvbAXnqoCLD6nbvH3AiB6wyTAvnRsR8hdfkW5z3ZQeW8xXIuKOg/JnWLBmnL89Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":476076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQiB7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSkw/9E/uMwQf37IUR6466Pid+OH30cxsOkT8LQhj4m6pODLZ0a7vj\r\nlAhiVUqoc4EyuMN9pXO63z2X+r9xsJgDL1iiNgTHAw5rA3eCR6oi6P0CJniR\r\nAHlX0HpjC6cwJ17B4KSqQtEnYZHkE6Ji1tbpWz959t0qvDW2j5Fuvv64vcy9\r\nPmZ/s+UE6upq6S+AUNNFZ5QixxB2Fwm9qUxhvXGy4uzfW45UJmmpAtdMLF72\r\nU+g3c0rSXH0yq8PUdP+DDplnm5vjsRzdTWdfKQ8eUC8QVV4ECqiQYNLaSg6E\r\nICr+Tt9L/R0QTTZ+CDXcups7i18xhW4J3q2rjfCC4ve0WNmswPup6PKO4mMk\r\nJ7dfBIsdO7zWmZWvrWNrZxKQk+QKi1mUCGThanTCRZFylwC6ezTcrrlcoUBD\r\npe6cXdrvqhCtzvlBlLhRlkEnF195XDLhNRQ63+2u5GjS1527alM/5Pg6f1Nu\r\nXjAx0k8k5Fs6O0fLSwlXR8yJZUF4fR4iWoHNoVoHQozzuXvtk6Ooj3ovLPlP\r\nq2+JbGwnGfg2GQgJP2r67l/hzeUFiRMJJURAEs8baWrSMntFG+9BzQkXRHNm\r\nkWajWo8urW7pPFqAZCCEIN9sZEtkNKosAI4lnxqHNkzl1BY9stX0VhmWHn0F\r\nNSopMO9tp3Z4JOQL76RxCzsSNUDs8r0roxg=\r\n=SMjZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","gitHead":"2a8a20cf0eba3da06269effcea73ad1fd558cf8f","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"7.5.3","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"15.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ip3country_5.0.0_1648500859489_0.3109141857185178","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"ip3country","version":"3.0.1","author":"","license":"ISC","_id":"ip3country@3.0.1","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"6e114beafb1d1edc4b1c58fc724b934633eb8cca","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-3.0.1.tgz","fileCount":6,"integrity":"sha512-IEC4+z/LKAcAHy3ZBeyrdqlj+tD4XbBdCpdDFrn7/UXS4QfSZ/XGHXCsvZFD0CNaFhnvfefR/HJEwVUKIJA9qw==","signatures":[{"sig":"MEQCIHM1J+klj8uX5ZIF/P00IGSR7oPoHiydlN5JM64cZRWZAiB5Kj6Q43EnxOtID6QcwkjqIq/XHd1p9CT4z6Gc/4RRPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":474902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHL3TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGpQ//Rs7JPV6zwVrUqBZPbbL5EP+ViQjRhe8sAsnQtN+tIENxs5dR\r\neiqphy45VTgelWfW/KMnCfTToLkMoF0zQgKzxgj+spPyCdNb74a+gnoNf1BZ\r\niMzyxs10uH62C42bxeRm8bVuYqlZOCpIskxkPg1EKtWCjFOt4E7gqnWPKssb\r\nZXQ5Zhr4EMPEZ5LiyfBL1SMy4bD97dT+knJKIV+X0DjJ1tlh1XMwk+tS44Hl\r\nipAundLe83MYqk6TS8HmababOO0kAGlWfKNizwdBhU8l8+agSToNQk1GlBu/\r\nEGiyEa0vy86WWsYqEKrViVBFZ0nTVxr5Ie5ZEqjFRd96Obg5kmiz4Rs7XMmH\r\n64KwS45R5EmXYCzE+UawtNbrsklZzc0XQdnxaWDQ+hiaVRERxnvvWHCq9Qe7\r\nTwofh7RBi6ypRi9GB6fFhHeamJL7xl9Jw2M6BTq1Wdz2nHvxGi4y18lzKinK\r\n9EnSFpiTJdXSm7W2jYmYmjxP9747AsxxTdu0uy6AUWQYc4KZ/kikLJ3bgEYg\r\nctr6tw0HBUGIk+H2TAoBNq6cM6RUBdTygr7+6kFUwgPf0B8TpYTXq73o2yHn\r\nuGZBfmVIY4IM1D+uWvwIW5DPb3CXIA9mW6D1SgLAFzAUcIwJj61ZE7kO5AWC\r\nfYp25X6y6qNKYOuHMk6Vo/lWBpWPD4bPpug=\r\n=ouRx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","readme":"# ip3country\n\nThis is a zero-dependency, super small, IP address to 2-letter [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) lookup library. There are already several libraries available, but none met our requirements for binary size and speed.\n\nThis project in its entirety is <500KB, compared to most alternatives out there that are north of 40MB (but might provide more than just countries).\n\nThe database used in this project is compacted from [IP2Location](https://lite.ip2location.com/database/ip-country). Their DB1.LITE edition is provided under CCA, with the attribution below:\n\n---\n\n**NOTE**\n\nThis site or product includes IP2Location LITE data available from <a href=\"https://lite.ip2location.com\">https://lite.ip2location.com</a>.\n\n---\n\n## Usage\n\n```bash\n$ npm install ip3country\n```\n\n```js\n// Setup\nconst ip3country = require(\"ip3country\");\n\nip3country.init();\n\n// Lookup using ip4 str\nip3country.lookupStr(\"123.45.67.8\"); // 'KR'.\n\n// Lookup using numeric ip\nconsole.log(ip3country.lookupNumeric(2066563848));\n```\n\n## Accuracy\n\n`ip3country`'s accuracy is dependent on IP2Location LITE's accuracy. In our experience, for country lookups, it is accurate enough for most applications.\n\nIP2Location publishes accuracy reports here: https://www.ip2location.com/data-accuracy\n\nThere's also this third party report available: https://www.cl.cam.ac.uk/~nz247/publications/JSAC2011-Geolocation.pdf\n\n## Name\n\nAll variants of \"ip2country\" were already taken in npm, so we decided to step it up.\n\n## Motivation\n\nAt [Statsig](https://www.statsig.com), we needed a library to evaluate location-based conditions on Feature Gates (Feature Flags).  We use ip3country to power country-level rollouts or A/B tests for new features.\n","gitHead":"b0a43f7af3e64306e234a8552fe7b3834e2e98a4","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"8.19.2","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"18.11.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/ip3country_3.0.1_1679605202693_0.9008995799551289","host":"s3://npm-registry-packages"}},"5.0.1":{"name":"ip3country","version":"5.0.1","author":"","license":"ISC","_id":"ip3country@5.0.1","maintainers":[{"name":"statsig","email":"serviceadmin@statsig.com"}],"homepage":"https://github.com/statsig-io/ip3country#readme","bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"dist":{"shasum":"82990bc303f6996701f514d9271a260ead9d88f9","tarball":"https://registry.npmjs.org/ip3country/-/ip3country-5.0.1.tgz","fileCount":6,"integrity":"sha512-w/eprz4no8XPp4rBW74jqg2KrO2A+ftBM7rhFKJYnlcLuG8H6wx9KfbPiSTqN5BPVLl/ZzwGivdal3omqS5+Gw==","signatures":[{"sig":"MEUCIQCR26fVgVo6joBW9usLrT9WSeEfLWu7LCKUYJAL8HlCJQIgbTfwvSBTbNpU2m4NLiKU9zxvDwg/brSc9FGLSablU/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":476076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHL3+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSqw//ejeLdLomhy4qXrDhz0zA9HKRlwzIZ9H/u1yQLcLDXTaE1ufu\r\ni7LhxfVZjiqHzYvZISnxcl0CsvjaDSgasCfzonaItZuP083r/ry5o0lyAsFL\r\nb60sxa1nXOFqR1wIrjGsDv3XpS9RR1VrKb4SMzZojJXNmcoNFGcZkkUe94fj\r\nmwDtH0iZ0XApSw1zHNWq5wdLVQCSfkumzJiWbSWDOqXX3ph/fo0X8dr+87pj\r\nSisHYABRTGbgT09cY0YxzlnDE1RPTxaw327M6kRJe7XVWyVhw5wh7rmdhQRh\r\n9k8uLiQwIcrNlJGeifXgVYxIkGe9z4N4ijOdwW6PovlW6De6AeI1VSOIpcDc\r\ncXWIuaYFeL5gvetbIYPUzEPe/UCyrfNzfJLSwgzIZ+mLVCVyxJSqAjV7ehgT\r\nHXI8goVG/Vq10cc4Wx4KNNCvMqrnKuMxH2RQ1nE9pH8u4I3dnYreXVvHZtOm\r\ns+ki05Wd0I2bx9QruvhSbB+RdjCTLDZIpLHd3shx/lAItka96uxJZfVlYppx\r\n5kWvOrH5LHZSj4IBRwDw6FExZEObNoho50szVQMjdCywuRsy+3EkmSVVT364\r\nCC5PWechXdcjR5/zfMe3b4lWiQyZdgWrA2UE0vqSU9Pe12xARMXqZQt0rP9R\r\nvlCYx5kD5RogwnHx2AkfW29d4UYeggaCfww=\r\n=capL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/ip3country.js","types":"types/ip3country.d.ts","readme":"[![npm version](https://badge.fury.io/js/ip3country.svg)](https://badge.fury.io/js/ip3country) [![install size](https://packagephobia.com/badge?p=ip3country)](https://packagephobia.com/result?p=ip3country) [![tests](https://github.com/statsig-io/ip3country/actions/workflows/tests.yml/badge.svg)](https://github.com/statsig-io/ip3country/actions/workflows/tests.yml)\n\n# ip3country\n\nThis is a zero-dependency, super small, IP address to 2-letter [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) lookup library. There are already several libraries available, but none met our requirements for binary size and speed.\n\nThis project in its entirety is <300KB, compared to most alternatives out there that are north of 40MB (but might provide more than just countries).\n\n(Other languages: Python: https://github.com/statsig-io/ip3country-py, Go: https://github.com/statsig-io/ip3country-go, Ruby: https://github.com/statsig-io/ip3country-ruby, Kotlin: https://github.com/statsig-io/ip3country-kotlin, C#/.Net: https://github.com/statsig-io/ip3country-dotnet)\n\nThe database used in this project is compacted from [IP2Location](https://lite.ip2location.com/database/ip-country). Their DB1.LITE edition is provided under CCA, with the attribution below:\n\n---\n\n**NOTE**\n\nThis site or product includes IP2Location LITE data available from <a href=\"https://lite.ip2location.com\">https://lite.ip2location.com</a>.\n\n---\n\n## Usage\n\n```bash\n$ npm install ip3country\n```\n\n```js\n// Setup\nconst ip3country = require(\"ip3country\");\n\nip3country.init();\n\n// Lookup using ip4 str\nip3country.lookupStr(\"123.45.67.8\"); // 'KR'.\n\n// Lookup using numeric ip\nconsole.log(ip3country.lookupNumeric(2066563848));\n```\n\n## Accuracy\n\n`ip3country`'s accuracy is dependent on IP2Location LITE's accuracy. In our experience, for country lookups, it is accurate enough for most applications.\n\nIP2Location publishes accuracy reports here: https://www.ip2location.com/data-accuracy\n\nThere's also this third party report available: https://www.cl.cam.ac.uk/~nz247/publications/JSAC2011-Geolocation.pdf\n\n## Binary data\n\nTo make this library easy to consume, we're using [btoj](https://github.com/statsig-io/btoj) to transform the necessary binary data into a js module that can be imported like any other module. You won't need to list `ip3country` as an external in your build process.\n\nWe're currently using brotli compression via [NodeJS's `zlib` library](https://nodejs.org/api/zlib.html#zlib_zlib_brotlicompresssync_buffer_options), which won't work in Browser environments. If you want `ip3country` on a browser, check version `3.0.0` (and feel free to publish `ip3country-browser`).\n\n## Name\n\nAll variants of \"ip2country\" were already taken in npm, so we decided to step it up.\n\n## Motivation\n\nAt [Statsig](https://www.statsig.com), we needed a library to evaluate location-based conditions on Feature Gates (Feature Flags). We use ip3country to power country-level rollouts or A/B tests for new features.\n","gitHead":"2a8a20cf0eba3da06269effcea73ad1fd558cf8f","scripts":{"test":"node tests/lookupTest.js"},"_npmUser":{"name":"statsig","email":"serviceadmin@statsig.com"},"repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"_npmVersion":"8.19.2","description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","directories":{},"_nodeVersion":"18.11.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/ip3country_5.0.1_1679605246011_0.48297041627435844","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-05-04T22:54:38.543Z","modified":"2026-06-04T00:05:10.900Z","1.0.0":"2021-05-04T22:54:38.794Z","1.0.1":"2021-05-04T23:31:08.369Z","1.0.2":"2021-05-05T00:02:22.711Z","2.0.0":"2021-05-06T00:06:32.766Z","2.0.1-beta.0":"2021-05-10T18:26:10.326Z","3.0.0":"2021-05-11T05:55:36.669Z","4.0.0":"2021-07-20T05:01:13.444Z","5.0.0-beta.1":"2022-03-28T20:50:25.298Z","5.0.0":"2022-03-28T20:54:19.755Z","3.0.1":"2023-03-23T21:00:02.991Z","5.0.1":"2023-03-23T21:00:46.222Z"},"bugs":{"url":"https://github.com/statsig-io/ip3country/issues"},"license":"ISC","homepage":"https://github.com/statsig-io/ip3country#readme","repository":{"url":"git+https://github.com/statsig-io/ip3country.git","type":"git"},"description":"This is a no-dependency, super lite version of IP2Location LITE lookup.","maintainers":[{"email":"sdk.dev@amplitude.com","name":"sdk.dev"},{"email":"daniel.graham@amplitude.com","name":"daniel-graham-amplitude"}],"readme":"","readmeFilename":""}