Socket
Socket
Sign inDemoInstall

iptocc

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    iptocc

look up country code from ip (ipv4)


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
2.10 MB
Created
Weekly downloads
 

Readme

Source

Usage

  1. the data is from ip2location free database.
  2. 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

FAQs

Last updated on 08 Nov 2018

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc