Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.
/ object-storage.js Public archive

Objet Storage is a localStorage controller with object models. Start with my API Wrapper :)

Notifications You must be signed in to change notification settings

FoobarIT/object-storage.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Change Log

Update 0.2v

  • Select specific property of model object. (OS.select(table, property))
  • Addition of several exceptions and error handling.
  • Several refactors from the library.
  • Fix a lot of bugs and performance increase .

Update 0.1v

  • Create data with object model. (OS.add(table, model))
  • Get data object. (OS.get(table))
  • Update Data object. (OS.update(table, property, value))
  • Delete "Table" & value. (OS.delete(table))
  • Get some information from API & localStorage.(OS.infos())

Docs

OS.add(table, model);
let userModel = {
  "name": "Steve",
  "fullname": "Jackson",
  "age": 14
}
OS.add("user", userModel)

Output: You have creating an table user with name, fullname and age models

OS.get(table);
OS.get("user")

Output: Here we get the user table

OS.update(table, property, value);
OS.update("user", "age", "15");

Output: Here we edit the age of Steve to 15 year old.

OS.select(table, property);
OS.select("user", "age");

Output: Here we select property of specific table. (15)

OS.delete(table);
OS.delete("user");

Output: We delete the table (key & value)

OS.infos();
OS.infos();

Output: Give some informations of API and localStorage

Parameters
Name Desc
table String
object Object
property String, Number, Boolean

About

Objet Storage is a localStorage controller with object models. Start with my API Wrapper :)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published