New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

xpdb

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xpdb

A simplified persistant data storage solution built on LevelDB

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 03 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts