Skip to content

Instantly share code, notes, and snippets.

@nagisa
Created August 28, 2011 20:58
Show Gist options
  • Save nagisa/1177216 to your computer and use it in GitHub Desktop.
Save nagisa/1177216 to your computer and use it in GitHub Desktop.
Stash
>> stash.set('a', function(){return true;})
<< 1
>> stash.add('a', 'adding string') //It shouldn't replace old value.
<< 1
>> stash.get('a') //Unexpected value, we would expect old function.
<< "adding string"
//For people who may want replace action, they could use stash.cut(); and stash.set(); again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment