build/authorify.js
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);
}
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);
}
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 ) ; }
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).
Stores an item in local storage .