@josue7/database
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

A local database, using FileSystem & Json.

Getting started

 const JsDB = require('@josue7/database')
 const db = JsDB();
 // Or
 const JsDB = require('@josue7/database')
 const db = new JsDB.DataBase();

Methods

setOne: void

findOne: void

fetch: Promise<any>

has: boolean

clear: void

remove: void

toJSON: Promise<any>

shift: void

filter: any

Realases

version 1.0.0 Intruducing
version 1.0.1 Adding some new methods
version 1.0.2 Fixing bugs
version 1.0.3 Fixing three bugs
version 1.0.4 Adding shift method
version 1.0.5 Adding filter and findAndUpdateOne method
version 1.1.0 Bugs fixed 🧑🏻
version 1.1.1 Updating readme file and bringing Collection

Examples

Setting something

 db.set('name', 'josue');

Finding something

 const find = db.find('name').name;

 console.log(find); // 'josue'

Findind and updating

 const find = db.findAndUpdateOne('name', {
    $new: (old) => old += ' figueiredo'
 }).name;

 console.log(find); // 'josue figueiredo'

Readme

Keywords

Package Sidebar

Install

npm i @josue7/database

Weekly Downloads

0

Version

1.1.1

License

ISC

Unpacked Size

10.5 kB

Total Files

13

Last publish

Collaborators

  • josue7