Skip to content

Instantly share code, notes, and snippets.

@trisapeace
Created September 25, 2012 02:38
Show Gist options
  • Select an option

  • Save trisapeace/3779669 to your computer and use it in GitHub Desktop.

Select an option

Save trisapeace/3779669 to your computer and use it in GitHub Desktop.
PouchDB emit function
var emit = function(key, val) {
var viewRow = {
id: current._id,
key: key,
value: val
}
if (options.include_docs) {
viewRow.doc = current.doc;
}
results.push(viewRow);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment