mmdb2json

A simple code and command-line utils to convert mmdb to json

Usage no npm install needed!

<script type="module">
  import mmdb2json from 'https://cdn.skypack.dev/mmdb2json';
</script>

README

Mmdb2Json

NPM Version Package License

Table of Contents

Description

A simple code and command-line utils to convert mmdb to json

Command line

Globally via npm

npm install --global mmdb2json

Running on-demand:

npx mmdb2json [options]

Examples

npx mmdb2json --help
    'usage: mmdb2json [options]',
    '',
    'options:',
    '  --input      Path to .mmdb file [GeoLite2-City.mmdb]',
    '  --output     Path to .json file [GeoLite2-City.json]',
    '  --help       Print this list and exit',
    '  --version    Print the version and exit.',
    '',

Use in code

Installation

npm install mmdb2json

Examples

  import { Mmdb2Json } from 'mmdb2json';

  const reader = Mmdb2Json.openSync(input);
  const result = reader.get();

License

MIT