Created
January 13, 2012 16:49
-
-
Save sgharms/1607457 to your computer and use it in GitHub Desktop.
localGet/Set for Timesheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timesheet.localGet = (key, store = Timesheet.Store) -> | |
val = null | |
store.get key, (ok, value) -> | |
val = JSON.parse(value) | |
val | |
Timesheet.localSet = (key, value, store = Timesheet.Store) -> | |
store.set(key, JSON.stringify(value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment