Skip to content

Instantly share code, notes, and snippets.

@mikeymckay
Created January 30, 2018 20:24
Show Gist options
  • Save mikeymckay/dbc535cf96d5cd7d1e967dc2787bc602 to your computer and use it in GitHub Desktop.
Save mikeymckay/dbc535cf96d5cd7d1e967dc2787bc602 to your computer and use it in GitHub Desktop.

Revisions

  1. mikeymckay created this gist Jan 30, 2018.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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