Created
September 25, 2012 02:38
-
-
Save trisapeace/3779669 to your computer and use it in GitHub Desktop.
PouchDB emit function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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