ip2c

1.0.1 • Public • Published

ip2c Node Module

Node.js module for resolve IPs to country codes/names using ip2c.org service.

Usage

const ip2c = require('./ip2c')
ip2c('ip_address').then(data => {
    console.log(data)
    /* return obj:
        {
            status: 200,
            headers: {...},
            data: { code: 'XX', iso: 'XXX', fullname: 'XXXXX' }
        }
    */
}).catch(err => console.log('error', err))

Readme

Keywords

Package Sidebar

Install

npm i ip2c

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

2.27 kB

Total Files

3

Last publish

Collaborators

  • pooky