couchrest_model/views/word_count/count-map.js

2 lines
162 B
JavaScript
Raw Normal View History

2008-06-02 18:36:48 +02:00
function(doc){var words=doc.text.split(/\W/).map(function(w){return w.toLowerCase()});words.forEach(function(word){if(word.length>0)emit([word,doc.title],1);});}