middleware/configList.js
function (records, cb) {

                // loop through each record
                async.each(records, function (record, recordDone) {

                    // loop through each field
                    async.each(Object.keys(req.linz.configList.fields), function (field, fieldDone) {

                        req.linz.configList.fields[field].renderer(record[field], record, field, req.linz.configs[record._id], function (err, value) {

                            if (err) {
                                return fieldDone(err, records);
                            }

                            var index = records.indexOf(record);
                            records[index][field] = value;

                            return fieldDone(null, records);

                        });

                    }, function (err) {

                        return recordDone(err, records);

                    });


                }, function (err) {

                    return cb(err, records);

                });

            }
function (records, cb) {

                // loop through each record
                async.each(records, function (record, recordDone) {

                    // loop through each field
                    async.each(Object.keys(req.linz.configList.fields), function (field, fieldDone) {

                        req.linz.configList.fields[field].renderer(record[field], record, field, req.linz.configs[record._id], function (err, value) {

                            if (err) {
                                return fieldDone(err, records);
                            }

                            var index = records.indexOf(record);
                            records[index][field] = value;

                            return fieldDone(null, records);

                        });

                    }, function (err) {

                        return recordDone(err, records);

                    });


                }, function (err) {

                    return cb(err, records);

                });

            }
function ( records , cb ) { // loop through each record async . each ( records , function ( record , recordDone ) { // loop through each field async . each ( Object . keys ( req . linz . configList . fields ) , function ( field , fieldDone ) { req . linz . configList . fields [ field ] . renderer ( record [ field ] , record , field , req . linz . configs [ record . _id ] , function ( err , value ) { if ( err ) { return fieldDone ( err , records ) ; } var index = records . indexOf ( record ) ; records [ index ] [ field ] = value ; return fieldDone ( null , records ) ; } ) ; } , function ( err ) { return recordDone ( err , records ) ; } ) ; } , function ( err ) { return cb ( err , records ) ; } ) ; }
apply renderer to values of each configs
apply renderer to values of each configs