1.0.5 • Published 4 years ago

xpdb v1.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

XPDB

Ultra-fast persistent database solution with a simple to use API

XPDB is a hyper-simplified wrapper around level, which is a wrapper around LevelUP, which is a wrapper around LevelDB. Sounds complicated, right? Nope.

XPDB is a super easy to use database system that is just like using a Map. Data is stored persistently, quickly, and all methods use Promises, which means you can use it with the fancy new async/await features! It can store any kind of data, including JSON.

Installation

npm install --save xpdb

Usage

var XPDB = require('xpdb');
var db = new XPDB('./myDB');

// Promises
db.put('some.key', 'Hello world!').then(() => {
	db.get('some.key').then(value => {
		console.log(value);
        // => Hello world!
    }).catch(console.error);
}).catch(console.error);

// async/await
try {
    await db.put('some.key', 'Hello world!');
	console.log(await db.get('some.key'));
	// => Hello world!
} catch (err) {
	console.error(err);
}

Methods

Coming soon, for now there are JavaDocs, and it should be pretty self-explanatory.

Join Me

Discord Badge

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago