argon/storage/local.js
function update(requestObj, callback) {
            var storage = this;            
            callback = callback || function defaultPutCallBack() {
                //setup Error notification
            };
            
            if ((typeof requestObj) === 'undefined' || requestObj === null) {
               callback(null);
               return this;
            }
            
            if (requestObj.data) {
                for (i = 0; i < storage.preprocessors.length; i++) {
                    requestObj.data = storage.preprocessors[i](requestObj.data, requestObj);
                }
            }
            
            this.storage[requestObj.data.id] = requestObj.data;
            
            var data = this.storage[requestObj.data.id];            

            for (i = 0; i < storage.processors.length; i++) {
                data = storage.processors[i](data, requestObj);
            }
            callback(data);
        }
function update(requestObj, callback) {
            var storage = this;            
            callback = callback || function defaultPutCallBack() {
                //setup Error notification
            };
            
            if ((typeof requestObj) === 'undefined' || requestObj === null) {
               callback(null);
               return this;
            }
            
            if (requestObj.data) {
                for (i = 0; i < storage.preprocessors.length; i++) {
                    requestObj.data = storage.preprocessors[i](requestObj.data, requestObj);
                }
            }
            
            this.storage[requestObj.data.id] = requestObj.data;
            
            var data = this.storage[requestObj.data.id];            

            for (i = 0; i < storage.processors.length; i++) {
                data = storage.processors[i](data, requestObj);
            }
            callback(data);
        }
function update ( requestObj , callback ) { var storage = this ; callback = callback || function defaultPutCallBack ( ) { //setup Error notification } ; if ( ( typeof requestObj ) === 'undefined' || requestObj === null ) { callback ( null ) ; return this ; } if ( requestObj . data ) { for ( i = 0 ; i < storage . preprocessors . length ; i ++ ) { requestObj . data = storage . preprocessors [ i ] ( requestObj . data , requestObj ) ; } } this . storage [ requestObj . data . id ] = requestObj . data ; var data = this . storage [ requestObj . data . id ] ; for ( i = 0 ; i < storage . processors . length ; i ++ ) { data = storage . processors [ i ] ( data , requestObj ) ; } callback ( data ) ; }
Updates a set of data on the storage instance
@method put <public>
@argument query <required> [Object] the query to the elements that must be updated
@argument callback [Function] The function that will be executed when the process ends
@return [Object] this
Updates a set of data on the storage instance