daleharvey/pouchdb — pull request #903 by commandoline (2013-08-14 18:03:11+00:00)
Title: Added opts argument to the compact() method globally.

The docs on the compact method specify an optional 'opts' argument. This argument is only used by the http adapter, and it's the only one which accepts it inside the function definition currently. This branch changes that, because that approach is suboptimal in at least two cases:

1) When switching from the http backend to another, the callback is never called (typeof {} !== "function" -> fails silently). There's a test included for this situation (depending on QUnit timing out sadly, but I can't find a better way and it seems that more tests are doing this.)
2) When making bindings for PouchDB so it can be used from another language (that was were I found out about this).