Fix minor style errors
And keep it that way, by making jscs config more opinionated. // FREEBIE
This commit is contained in:
@@ -22,16 +22,18 @@
|
||||
*** Base Storage Routines ***
|
||||
*****************************/
|
||||
put: function(key, value) {
|
||||
if (value === undefined)
|
||||
if (value === undefined) {
|
||||
throw new Error("Tried to store undefined");
|
||||
}
|
||||
var item = items.add({id: key, value: value}, {merge: true});
|
||||
item.save();
|
||||
},
|
||||
|
||||
get: function(key, defaultValue) {
|
||||
var item = items.get("" + key);
|
||||
if (!item)
|
||||
if (!item) {
|
||||
return defaultValue;
|
||||
}
|
||||
return item.get('value');
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user