Skip to content

Instantly share code, notes, and snippets.

@senny
Created September 9, 2010 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save senny/571872 to your computer and use it in GitHub Desktop.
Save senny/571872 to your computer and use it in GitHub Desktop.
function(keys, values, rereduce) {
if (rereduce) {
var result = [];
values.forEach(function(valueGroup){
valueGroup.forEach(function(value){
result.push(value);
});
});
return result;
} else {
return values;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment