mmdblookup

0.1.0 • Public • Published

mmdblookup

Build Status Coverage Status

Originally a promise based spawn version of the mmdblookup utility, with an updated ip-to-country-lite default database from IP Geolocation by DB-IP, this is now a simple layer on top of node-maxmind.

const mmdblookup = require('mmdblookup');

mmdblookup('8.8.8.8').then(console.log);

// passing along the path
mmdblookup('8.8.8.8', ['continent']).then(console.log);

// initializing with another db
// i.e. https://db-ip.com/db/ip-to-country
const payedDB = require('mmdblookup').mddb('./full-ip-to-country-lite.mddb');
// or
const payedDB = mmdblookup.mddb('./full-ip-to-country-lite.mddb');
payedDB('8.8.8.8').then(console.log);

The .mmdb(mmdbFilePath[, options = {}]) accepts same options object accepted by maxmind.

Package Sidebar

Install

npm i mmdblookup

Weekly Downloads

2

Version

0.1.0

License

ISC

Unpacked Size

5.75 MB

Total Files

7

Last publish

Collaborators

  • webreflection