templates for app generate
This commit is contained in:
parent
f13415febe
commit
49148644ea
3 changed files with 44 additions and 0 deletions
10
lib/couchrest/helper/templates/example-reduce.js
Normal file
10
lib/couchrest/helper/templates/example-reduce.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
// example reduce function to count the
|
||||
// number of rows in a given key range.
|
||||
|
||||
function(keys, value, rereduce) {
|
||||
if (rereduce) {
|
||||
return sum(values);
|
||||
} else {
|
||||
return values.length;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue