Created
January 30, 2018 20:24
-
-
Save mikeymckay/dbc535cf96d5cd7d1e967dc2787bc602 to your computer and use it in GitHub Desktop.
show all available revisions
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
db = new PouchDB() | |
user = "user.mmckay" | |
db.get user, | |
revs_info: true | |
.then (result) -> | |
availableRevs = _(result._revs_info).chain().filter (rev) -> | |
rev.status is "available" | |
.pluck("rev").value() | |
_(availableRevs).each (rev) -> | |
db.get user, | |
rev: rev | |
.then (result) -> | |
console.log result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment