Skip to content

Instantly share code, notes, and snippets.

@mpociot
Created September 26, 2012 11:12
Show Gist options
  • Save mpociot/3787399 to your computer and use it in GitHub Desktop.
Save mpociot/3787399 to your computer and use it in GitHub Desktop.
Simple commonJS datastorage
// Private variable data
var data = {};
function setValue(key,value){
data[key] = value;
}
function getValue(key){
return data[key];
}
exports.setValue = setValue;
exports.getValue = getValue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment