Skip to content

deepjs/deep-jstorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deep-jstorage

local storage driver (store) for deepjs (based on jstorage)

install

bower install deep-jstorage

You should also have jstorage loaded in your page.

Collection store Usage

var deep = require("deepjs/deep");
require("deep-jstorage/lib/collection");
require("deep-restful/index");

new deep.jstorage.Collection("myprotocol");

deep.restful("myprotocol")
.post({ hello:"world" })
.get()
.log();

deep.nodes("myprotocol::?hello=world").log();

deep.restful("myprotocol")
.put({ id:'test', myVar:"hello", myObject:{ myVar2:12344 }})
.slog()
.patch("patched with query","test/myVar")
.slog()
.get("test")
.slog()
.put(7777777,"test/myObject/myVar2")
.slog()
.patch({other:true},"test/myObject/myVar2")
.slog()
.get("test")
.log();

Object store Usage

var deep = require("deepjs/deep");
require("deep-jstorage/lib/object");
require("deep-restful/index");

new deep.jstorage.Object("myprotocol");

deep.restful("myprotocol")
.post({ hello:"world", id:"/my/path" })
.get()
.log();

deep.nodes("myprotocol::/my/path").log();

//...

About

local storage store for deepjs (based on jstorage)

Resources

License

Stars

Watchers

Forks

Packages

No packages published