pouchdb/pouchdb — pull request #2681 by nolanlawson (2014-08-25 00:16:09+00:00)
Title: (#2676) - WIP - support for Sync Gateway

Holy moley, this is way too much code to take in all at once.

I think we need to break this down into smaller steps:

1) support multipart. this is useful for CouchDB too, anyway.
2) support the other Sync Gateway crap (_removed, etc.)
3) Add tests for the Sync Gateway. (we can use the community edition, right?)

As goals, I think 1 is much more achievable than 2 and 3. This code needs a lot of work before we can get there, though. For starters:

1) fixed the jshint stuff for ya
2) the arrayBufferToString stuff etc. should go into utils. I believe some of that is already implemented as well
2) `CSG does not accept multiple keys on a GET request`. I believe this is true for Cloudant as well, but it breaks Safari 6 last I checked, so we're doomed I guess. Maybe we can detect support by catching an error.