0.1.1 • Published 3 years ago

mdb-json v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

mdb-json

Working with .MDB files from a linux environment can be a pain in the a$$. So after playing with a couple existing frameworks I ended up just building my own wrapper and decided to make it a package for future use.

Relies on mdbTools

Only built the wrapper for MDB -> JSON. However if requested I will build out the functions for CSV, Table Lists, And Exports

Install

npm install mdb-json

Usage

Async

const { parseMDB } = require('mdb-json');

function = async () => {
 const json = await parseMDB(filePath, Table)
}

ES5

const { parseMDB } = require('mdb-json');

function = () => {
 parseMDB(filePath, Table).then(json => {
     //EXAMPLE FOR AN .MDB FILE WITH A TABLE CALLED PEOPLE
     //parseMDB('absoluteFilePath.mdb', 'People')
 }).catch(err => {
     //Err = Error parsing data or finding file.
 })
}

Notes

Make sure the file path is absolute. If using this in your node project and trying to pass the file in a current directory. Use Path to resolve the full file name.

WILL NOT WORK: './file.mdb'

WILL WORK: '/user/development/folder/currentdirectory/file.mdb'


Requirements

You must have mdbtools installed on your system.

Linux

apt install mdbtools

OSX (Working as of BigSur)

brew install mdbtools
0.1.1

3 years ago

0.1.0

3 years ago