Skip to content

Instantly share code, notes, and snippets.

@sgharms
Created January 13, 2012 16:49
Show Gist options
  • Save sgharms/1607457 to your computer and use it in GitHub Desktop.
Save sgharms/1607457 to your computer and use it in GitHub Desktop.
localGet/Set for Timesheet
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