1.0.3 • Published 4 months ago

geardb v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Another Local JSON Database

GitHub license GitHub stars GitHub forks GitHub issues GitHub pull requests

First of all, thank you for using thegears/geardb

How to use

Install

npm install geardb

Usage

// ES6
import GearDB from 'geardb';
// CommonJS
const GearDB = require('geardb');

const db = new GearDB("db.json"); // path to db.

db.set("key", "value");

console.log(db.get("key")); // log 'value'

db.push("list", "value");

console.log(db.get("list")); // log ['value']

db.pull("list", "value");

// -- OR --

db.pull("list", 0);

console.log(db.get("list")); // log []

You can use set, push, pull with await. (This way is recommended.)

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago