Add new keys to localStorage and set them to the given default values if they do not exist
Parameters
props: object
key and corresponding values
Returns void
Name
add
Memberof
save
Example
// Initialize "score" and "lives" with default values me.save.add({ score :0, lives :3 }); // get or set the value through me.save me.save.score = 1000;
remove:function
remove(key): void
Remove a key from localStorage
Parameters
key: string
key to be removed
Returns void
Name
remove
Memberof
save
Example
// Remove the "score" key from localStorage me.save.remove("score");
Add new keys to localStorage and set them to the given default values if they do not exist