A JavaScript, zero-dependency, super small version of IP2Location LITE country lookups.

Overview

ip3country

This is a zero-dependency, super small, IP address to 2-letter country code lookup library. There are already several libraries available, but none met our requirements for binary size and speed.

This project in its entirety is <500KB, compared to most alternatives out there that are north of 40MB (but might provide more than just countries).

The database used in this project is compacted from IP2Location. Their DB1.LITE edition is provided under CCA, with the attribution below:


NOTE

This site or product includes IP2Location LITE data available from https://lite.ip2location.com.


Usage

$ npm install ip3country
// Setup
const ip3country = require("ip3country");

ip3country.init();

// Lookup using ip4 str
ip3country.lookupStr("123.45.67.8"); // 'KR'.

// Lookup using numeric ip
console.log(ip3country.lookupNumeric(2066563848));

Accuracy

ip3country's accuracy is dependent on IP2Location LITE's accuracy. In our experience, for country lookups, it is accurate enough for most applications.

IP2Location publishes accuracy reports here: https://www.ip2location.com/data-accuracy

There's also this third party report available: https://www.cl.cam.ac.uk/~nz247/publications/JSAC2011-Geolocation.pdf

Name

All variants of "ip2country" were already taken in npm, so we decided to step it up.

You might also like...

A zero-dependency, buildless, terse, and type-safe way to write HTML in JavaScript.

hdot A sensible way to write HTML in JavaScript. Type-safe. Helps you follow the HTML spec. Terse. Almost character for character with plain HTML. Bui

Oct 24, 2022

Opinionated, type-safe, zero-dependency max/min priority queue for JavaScript and TypeScript projects.

qewe qewe is an opinionated, type-safe, zero-dependency max/min priority queue for JavaScript and TypeScript projects. Installation Add qewe to your p

Jan 10, 2022

A tiny and fast zero-dependency date-picker built with vanilla Javascript and CSS.

A tiny and fast zero-dependency date-picker built with vanilla Javascript and CSS.

A tiny zero-dependency and framework-agnostic date picker that is incredibly easy to use! Compatible with any web UI framework, vanilla JS projects, and even HTML-only projects!

Jan 22, 2021

Zero Dependency, Vanilla JavaScript Tag Editor

Zero Dependency, Vanilla JavaScript Tag Editor

_____ |_ _|___ ___ ___ ___ ___ | | | .'| . | . | -_| _| |_| |__,|_ |_ |___|_| |___|___| version 0.4.4 Tagger: Zero dependenc

Nov 25, 2022

Super-Resolution-CNN - web server for super-resolution CNN

Super-Resolution-CNN - web server for super-resolution CNN

Web Server for Image Super-Resolution This project showcases the Super-Resolution CNN (SRCNN). The model is pretrained following this tutorial. The or

Jan 3, 2022

A lightweight Adobe Photoshop .psd/.psb file parser in typescript with zero-dependency for WebBrowser and NodeJS

@webtoon/psd A lightweight Adobe Photoshop .psd/.psb file parser in typescript with zero-dependency for WebBrowser and NodeJS Browser Support Chrome F

Jan 1, 2023

Dynamic, fast, accessible & zero dependency accordion for React

Dynamic, fast, accessible & zero dependency accordion for React

React Fast Accordion ⚡️ Dynamic, fast, accessible & zero dependency accordion for React How it's fast? Instead of adding event listener on all the ite

Oct 8, 2022

Shifty is a tiny zero-dependency secrets generator, built for the web using TypeScript.

Shifty is a tiny zero-dependency secrets generator, built for the web using TypeScript. Installation yarn add @deepsource/shifty Usage Shifty is built

Nov 24, 2022

A modern, zero-dependency uptime monitoring tool & status page based on GitHub Actions & Nuxt Content v2.

A modern, zero-dependency uptime monitoring tool & status page based on GitHub Actions & Nuxt Content v2.

StatusBase Uptime monitoring tool & beautiful status pages Powered by Nuxt Content v2! Free • Open Source • Notification View Demo · Report Bug · Requ

Dec 27, 2022

A modern, zero-dependency uptime monitoring tool & status page based on GitHub Actions & Nuxt Content v2.

A modern, zero-dependency uptime monitoring tool & status page based on GitHub Actions & Nuxt Content v2.

StatusBase Uptime monitoring tool & beautiful status pages Powered by Nuxt Content v2! Free • Open Source • Notification View Demo · Report Bug · Requ

Jul 5, 2022

Jsonup - This is a zero dependency compile-time JSON parser written in TypeScript

jsonup This is a zero dependency compile-time JSON parser written in TypeScript.

Dec 8, 2022

Zero dependency profanity detector.

@cnakazawa/profane Zero dependency profanity detector based on Swearjar and Profane. Note: Some examples may contain offensive language for illustrati

Dec 28, 2022

A zero-dependency, strongly-typed web framework for Bun, Node and Cloudflare workers

nbit A simple, declarative, type-safe way to build web services and REST APIs for Bun, Node and Cloudflare Workers. Examples See some quick examples b

Sep 16, 2022

ppo is a super small and useful utils library for JavaScript 🐝🐜

ppo is a super small and useful utils library for JavaScript 🐝🐜

Overview Every frontend developer has written his own utils library, and we often write methods that are easily forgotten and highly used. ppo is a su

Jul 21, 2022

Compile optimized Vega and Vega-Lite bundles.

vega-bundler Utilities for pre-parsing Vega and Vega-Lite specifications and producing optimized module bundles. Both and Vega and Vega-Lite have thei

Jul 29, 2021

Analysis of WordPress 3D Print Lite 1.9.1.4 - arbitrary file upload vulnerability.

Analysis of WordPress 3D Print Lite 1.9.1.4 - arbitrary file upload vulnerability.

3DPrint-Lite-1.9.1.4-File-Upload Analysis of WordPress 3D Print Lite 1.9.1.4 - arbitrary file upload vulnerability. The Vulnerability: This vulnerabil

Mar 15, 2022

Material Design Lite for Ember.js Apps

Material Design Lite for Ember.js Apps

ember-material-lite Google's Material Design Lite for Ember.js apps This addon requires ember = 1.11.0 Installation # ember-cli 0.2.3 ember install

Dec 17, 2021

🎯 Wallet Lite is a Quick and Simple way to use your Tokens of Lunes Blockchain in a light Chrome extension

Lunes Wallet Lite Offered by: Lunes Installing Web store: Lunes Lite will be available on Chrome Web Store Build: Requisites NodeJS (16 or higher) Git

Oct 25, 2022

CLI tool to update caniuse-lite to refresh target browsers from Browserslist config

Update Browserslist DB CLI tool to update caniuse-lite with browsers DB from Browserslist config. Some queries like last 2 version or 1% depends on a

Dec 30, 2022
Releases(v4.0.0)
Owner
Statsig
Better products through data.
Statsig
Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more! Easy deployment version (Node.js)

Ultraviolet-Node The deployable version of Ultraviolet, a highly sophisticated proxy used for evading internet censorship or accessing websites in a c

Titanium Network 27 Jan 2, 2023
Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more! Easy deployment version (Node.js)

Ultraviolet-Node The deployable version of Ultraviolet, a highly sophisticated proxy used for evading internet censorship or accessing websites in a c

Titanium Network 34 Apr 15, 2022
A window.fetch JavaScript polyfill.

window.fetch polyfill The fetch() function is a Promise-based mechanism for programmatically making web requests in the browser. This project is a pol

GitHub 25.6k Jan 4, 2023
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.

http-fake-backend Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes. It actually can serve

Micromata GmbH 279 Dec 11, 2022
A server side agnostic way to stream JavaScript.

JS in JSN A server side agnostic way to stream JavaScript, ideal for: inline hydration network free ad-hoc dependencies bootstrap on demand libraries

Andrea Giammarchi 26 Nov 21, 2022
catbot-9000 is a javascript market-loser bot running on node.js.

catbot-9000 catbot-9000 is a Chia bot framework running on node.js. It was used during the CATMOS launch event on Hashgreen. If you are looking for th

null 9 Nov 16, 2022
A JavaScript, zero-dependency, super small version of IP2Location LITE country lookups.

A JavaScript, zero-dependency, super small version of IP2Location LITE country lookups.

Statsig 34 Dec 14, 2022
Country finder: A site that allows you to browse the countries of the world with all the necessary information about the country

Country finder: A site that allows you to browse the countries of the world with all the necessary information about the country

Medjahdi Islem 12 Nov 18, 2022
This is Covid-19 data that shows for each country.You can search your country and know its statistics .

COVID-19 Data TRACKER This is Covid-19 data that shows for each country.You can search your country and know its statistics . Built With HTML, CSS, SC

Samiullah Bhadur 2 Apr 21, 2022
A lite version for the my original app loki stream which allowed watching anime on your phone. Made using expo.

LokiStream Lite A lite version for the my original app loki stream. This app is faster, smaller and more optimized for your phone. It allows you to wa

Lavish Kumar 18 Dec 24, 2022