1.0.3 • Published 10 months ago

libmaxmind v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

libmaxmind

Depfu

Thin wrapper over npm mmdb-lib, repackaged for direct use in browsers.

!IMPORTANT
Reader class is enhanced with ArrayBuffer support.

Under the hood this package includes browser-compatible Buffer implementation and shims some of the Node.js APIs used by the library.

✨ Usage

import { Reader } from 'https://esm.run/libmaxmind';

const response = await fetch(
  'https://raw.githubusercontent.com/maxmind/MaxMind-DB/main/test-data/GeoLite2-Country-Test.mmdb'
);

const arrayBuffer = await response.arrayBuffer();
const reader = new Reader(arrayBuffer);

reader.get('89.160.20.122');

Apart from ArrayBuffer support the rest of API is left intact.

šŸ‘ Credits

āš– License

MIT

1.0.3

10 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago