iptocc
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    8
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i iptocc

Weekly Downloads

7

Version

1.0.2

License

ISC

Unpacked Size

2.2 MB

Total Files

9

Last publish

Collaborators

  • abiu