argon/storage/local.js
function create(requestObj, callback) {
           
            var storage = this;

            callback = callback || function defaultPostCallback() {
                //setup Error Notification here
            };
            
            if ((typeof requestObj) === 'undefined' || requestObj === null) {
               callback();
               return this;
            }
            
            requestObj.data.id = this._generateUid();

			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);
            }
            callback(data);
            
            return this;
        }
function create(requestObj, callback) {
           
            var storage = this;

            callback = callback || function defaultPostCallback() {
                //setup Error Notification here
            };
            
            if ((typeof requestObj) === 'undefined' || requestObj === null) {
               callback();
               return this;
            }
            
            requestObj.data.id = this._generateUid();

			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);
            }
            callback(data);
            
            return this;
        }
function create ( requestObj , callback ) { var storage = this ; callback = callback || function defaultPostCallback ( ) { //setup Error Notification here } ; if ( ( typeof requestObj ) === 'undefined' || requestObj === null ) { callback ( ) ; return this ; } requestObj . data . id = this . _generateUid ( ) ; 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 ) ; } callback ( data ) ; return this ; }
Creates new data on the storage instance
@method post <public>
@argument data <required> [Object] the data to create on the storage instance
@argument callback [Function] The function that will be executed when the process ends
@return [Array]
Creates new data on the storage instance