Skip to content

Instantly share code, notes, and snippets.

@natevw
Created September 4, 2014 16:10
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 natevw/f716b8b31e8f33ee975e to your computer and use it in GitHub Desktop.
Save natevw/f716b8b31e8f33ee975e to your computer and use it in GitHub Desktop.
// paste this into browser's JavaScript console
// it should dump out your entire database as JSON text
// (you can also play with `db` and/or `exportedDocs` variables)
var db = Pouch("metakaolin2", function (e, db) {
if (e) throw e;
db.allDocs({include_docs:true}, function (e,d) {
if (e) throw e;
var docs = d.rows.map(function (r) { return r.doc; });
window.exportedDocs = docs;
console.log(JSON.stringify(docs, null, 4));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment