Skip to content

Instantly share code, notes, and snippets.

@msgodf
Created May 26, 2011 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msgodf/993510 to your computer and use it in GitHub Desktop.
Save msgodf/993510 to your computer and use it in GitHub Desktop.
Rough and ready localStorage object for node.js
localStorage=(function(){function t(){this.store={};};t.prototype={constructor:t,setItem:function(k,v){this.store[k]=v;},getItem:function(k){return this.store[k];}};return new t;})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment