Socket
Book a DemoInstallSign in
Socket

iptocc

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iptocc

look up country code from ip (ipv4)

1.0.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Usage

  • the data is from ip2location free database.
  • it only supports country code info

how to use

npm install ip2cc
const iptocc = require('iptocc');
const countryCode = iptocc('164.52.12.83');
console.log(countryCode);//HK

how about efficiency

node index.test.js

on my mac ,look up 1,000,000 ips only need about 2000ms.
it is faster hundred times than ip2location-nodejs.

Keywords

ip2cc

FAQs

Package last updated on 08 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.