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 year ago
JSON representation
A simple code and command-line utils to convert mmdb to json
- Host: GitHub
- URL: https://github.com/svtslv/mmdb2json
- Owner: svtslv
- Created: 2020-03-13T14:53:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-30T11:03:07.000Z (almost 2 years ago)
- Last Synced: 2025-04-01T10:42:17.963Z (about 1 year ago)
- Topics: converter, geoip2, json, maxmind, mmdb
- Language: JavaScript
- Homepage:
- Size: 2.08 MB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mmdb2Json
## 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