Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created September 10, 2012 21:14
Show Gist options
  • Save eduardolundgren/3693900 to your computer and use it in GitHub Desktop.
Save eduardolundgren/3693900 to your computer and use it in GitHub Desktop.
Liferay.Store
set: function() {
var instance = this;
var args = arguments;
var namespace = null;
var key = args[0];
var value = args[1];
if (args.length === 3) {
namespace = args[0];
key = args[1];
value = args[2];
}
var obj = {
namespace: namespace
};
if (isObject(value)) {
value = TOKEN_SERIALIZE + A.JSON.stringify(value);
}
obj[key] = value;
instance._setValues(obj);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment