Skip to content

Instantly share code, notes, and snippets.

View Chofoteddy's full-sized avatar

Christopher Castaneira Chofoteddy

View GitHub Profile
@Chofoteddy
Chofoteddy / StorageObject.js
Last active August 29, 2015 14:02 — forked from jfsiii/gist:814784
get and set objects in localStorage and sessionStorage
// Forked from jfsiii https://gist.github.com/jfsiii/814784
// Forked from paul irish's https://gist.github.com/paulirish/601751
// desire: localStorage and sessionStorage should accept objects
// in fact they do according to spec.
// http://code.google.com/p/chromium/issues/detail?id=43666
// but so far that part isnt implemented anywhere.
// so we duckpunch set/getItem() to stringify/parse on the way in/out