patch-drafts
v0.0.6
Published
localStorge based drafts module for patch-* related apps
Downloads
12
Readme
Patch-drafts
A module for storing and retreiving drafts of messages in patch-* family apps. Drafts are persisted to localStorage.
You'll need to understand depject (a module for a different way of managing dependency injection), and for hte example below, depnest - a lazy way to write nested objects quickly.
API
drafts.sync.get
(key) - fetch the draft stored under key
drafts.sync.set
(key, text) - set/ save some draft text under key
drafts.sync.remove
(key) - delete a draft set under key
Note key
can be a String or a Object