Skip to content

Instantly share code, notes, and snippets.

@jarek-foksa
Created January 21, 2012 17:43
Show Gist options
  • Save jarek-foksa/1653401 to your computer and use it in GitHub Desktop.
Save jarek-foksa/1653401 to your computer and use it in GitHub Desktop.
Storage.prototype.set = (item, value) ->
@setItem item, JSON.stringify value
Storage.prototype.get = (item) ->
return JSON.parse @getItem(item)
Object.makeNonEnumerable Storage.prototype, ['set', 'get']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment