Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/svtslv/mmdb2json

A simple code and command-line utils to convert mmdb to json
https://github.com/svtslv/mmdb2json

converter geoip2 json maxmind mmdb

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# Mmdb2Json

NPM Version
Package License

## Table of Contents

- [Description](#description)
- [Command line](#command-line)
- [User in code](#use-in-code)
- [License](#license)

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

## Command line

#### Globally via `npm`

```bash
npm install --global mmdb2json
```

#### Running on-demand:

```bash
npx mmdb2json [options]
```

### Examples

```bash
npx mmdb2json --help
```

```bash
'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

```bash
npm install mmdb2json
```

### Examples

```ts
import { Mmdb2Json } from 'mmdb2json';

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

## License

MIT