lib/card.js
function (params, state, viewModel, clientLocals, cb) {
                  // don't save if nothing came back, just forward the call
                  if (!_.isEmpty(state)) {
                    DB.saveCardState(params.cardKey, state, function (err) {
                      cb(err, params, viewModel, clientLocals);
                    });
                  }
                  else {
                    cb(null, params, viewModel, clientLocals);
                  }
                }
function (params, state, viewModel, clientLocals, cb) {
                  // don't save if nothing came back, just forward the call
                  if (!_.isEmpty(state)) {
                    DB.saveCardState(params.cardKey, state, function (err) {
                      cb(err, params, viewModel, clientLocals);
                    });
                  }
                  else {
                    cb(null, params, viewModel, clientLocals);
                  }
                }
function ( params , state , viewModel , clientLocals , cb ) { // don't save if nothing came back, just forward the call if ( ! _ . isEmpty ( state ) ) { DB . saveCardState ( params . cardKey , state , function ( err ) { cb ( err , params , viewModel , clientLocals ) ; } ) ; } else { cb ( null , params , viewModel , clientLocals ) ; } }
save any state changes made during getCardData
save any state changes made during getCardData