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

0.0.4 • Public • Published

This is a MaxMind database reader for web browsers.

Example:

const response = await fetch('/path/to/GeoLite2-City.mmdb', {
  cache: 'force-cache',
});
if (!response.ok) {
  throw new Error(`Error fetching database: ${response.status} ${response.statusText}`);
}
const maxmind = new MaxMindDB();
await maxmind.load(response);
console.log(maxmind.get('1.1.1.1'));

Status: this is a brand new package so there are probably bugs. Please open a GitHub issue if you find one.

You can get this package from npm, or load the code directly in a <script> tag (see demo page).

Readme

Keywords

Package Sidebar

Install

npm i maxmind-db

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

45.6 kB

Total Files

11

Last publish

Collaborators

  • stefansundin