okfn/recline — pull request #171 by slmnhq (2012-06-25 19:12:19+00:00)
Title: #162 refactor couchdb.js

Okay so I've done the wholesale refactor. The code is free of syntax errors but I've not had the chance to test it.

Note, the 'save' method will process multiple changes, but it will do so concurrently. This might be a problem in some cases when the same document on the server is being modified numerous times. The correct way to handle this would be to use Deferred.pipe to perform the operations sequentially I think. Let me know if you have other thoughts.