couchrest_model/lib/couchrest/helper/template-app/views/example/map.js

10 lines
192 B
JavaScript
Raw Normal View History

2008-09-16 17:15:00 +02:00
// an example map function, emits the doc id
// and the list of keys it contains
function(doc) {
2009-01-02 07:45:41 +01:00
// include-lib
2008-09-16 17:15:00 +02:00
var k, keys = []
for (k in doc) keys.push(k);
emit(doc._id, keys);
};