Skip to content

Instantly share code, notes, and snippets.

View junipertcy's full-sized avatar
🐋
nuit blanche

Tzu-Chi Yen junipertcy

🐋
nuit blanche
View GitHub Profile
SomeSchema.methods.mapReduce = function(callback) {
function map() {
/*global emit:true */
emit('something', {foos:this.foos, users:1});
}
function reduce(k, av) {
var foos = 0;
av.forEach(function(v) {