code: function(api, id, key, data) {
    // get storage object
    var obj = _getStorageObject(api, id);
    if(obj === null) {
      // create a new storage object
      obj = {};
    }
    // update key
    obj[key] = data;
  
    // set storage object
    _setStorageObject(api, id, obj);
  }
docs: Stores an item in local storage.
  
  @param api the storage interface.
  @param id the storage ID to use.
  @param key the key for the item.
  @param data the data for the item (any javascript object/primitive).