Storage API
storage.set()
Sets the values for the passed keys in the storage.
- Accepts the key of the value as a string for the first argument, a value in any format for the second, or a single object as a single argument.
Example:
storage.set('book', 'cat');
// Sets the value 'cat' for the key 'book' in the storage.
storage.set('book', {key1: 10, key3: {cat: [1, 2], elements: [$('div'), $('span')]}});
// Sets the value {key1: 10, key3: {cat: [1, 2], elements: [<div>, <span>]}} for the key 'book' in the storage.
storage.set({key1: 'cat', key2: ['book', 'cat']});
// Sets the value 'cat' for the key 'key1' and the value ['book', 'cat'] for the key 'key2' in the storage.