Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libmaxminddb

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libmaxminddb

Node.js bindings for libmaxminddb (to read MaxMind DB with the best performance - using memory-mapped file!)

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41
increased by115.79%
Maintainers
1
Weekly downloads
 
Created
Source

libmaxminddb

npm version TypeScript Test Status

Node.js bindings for libmaxminddb.
To read MaxMind Databases with the best performance (using memory-mapped files)!

This module provides its own TypeScript declarations (.d.ts).

Installation

npm install libmaxminddb

This package uses the native library libmaxminddb. If you have a common system then a prebuilt version will be used.
Otherwise look at the advanced libmaxminddb installation instructions.

Examples

const {MmdbReader} = require('libmaxminddb');

MmdbReader.open({filename: 'GeoIP2-Country-Test.mmdb'}).then(async (mmdb) => {
  const {netmask, entry} = await mmdb.lookup('50.114.1.1');
  console.log(entry);
});

For a more detailed example look at demo.js (or demo.ts for TypeScript).

Documentation

For a detailed API reference, see: node-libmaxminddb.nathan818.fr

Testing

To run the test suite, you first need to clone the submodules.

git submodule init
git submodule update --recursive

Then install the dependencies and run npm run test:

npm ci
npm run test

Contributing

Contributions are welcome. It is recommended to open an issue before introducing new features to discuss them.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

Keywords

FAQs

Package last updated on 05 Sep 2023

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc