couchrest_model/lib/couchrest/helper/app-template/views/example/reduce.js
2009-01-08 09:50:45 -08:00

10 lines
No EOL
201 B
JavaScript

// example reduce function to count the
// number of rows in a given key range.
function(keys, values, rereduce) {
if (rereduce) {
return sum(values);
} else {
return values.length;
}
};