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

10 lines
193 B
JavaScript
Raw Normal View History

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