Skip to content

agrublev/local-storage-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-data logo

NPM

Local Storage Database consistency with objects.

Simple class to store data and manage it easily.

Just getting started?

Checkout example on codesandbox:

Edit local-storage-database

Import module:

import Collection from "../release/localDatabase";

Create the instance (or many):

let myCollection = new Collection("test");

Interact with it:

let myCollection = new Collection("test");
// set some data
myCollection.set({ test: 2323, gra: 23 });
// update it with new data
myCollection.set({ awesome: 2323 });
// get entire json db
console.log(myCollection.get());
// or single key
console.log(myCollection.get("test"));
// remove single key
console.log(myCollection.remove("gra"));
// remove entire db
console.log(myCollection.remove());

Releases

No releases published

Packages

No packages published