
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
libmaxminddb
Advanced tools
Node.js bindings for libmaxminddb (to read MaxMind DB with the best performance - using memory-mapped file!)
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).
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.
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).
For a detailed API reference, see: node-libmaxminddb.nathan818.fr
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
Contributions are welcome. It is recommended to open an issue before introducing new features to discuss them.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
FAQs
Node.js bindings for libmaxminddb (to read MaxMind DB with the best performance - using memory-mapped file!)
The npm package libmaxminddb receives a total of 6 weekly downloads. As such, libmaxminddb popularity was classified as not popular.
We found that libmaxminddb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.