No9/localstorage-down — pull request #6 by adamshih (2014-04-29 20:49:52+00:00)
Title: Additional buffer check in put

Backstory: putting attachments with PouchDB using localstorage-down works in Chrome but not Firefox (https://github.com/pouchdb/pouchdb/issues/2098).

Tracked the difference down to this if-guard, which succeeds in Firefox since value.buffer == undefined but not in Chrome. An additional Buffer.isBuffer(value) check seems to take care of the problem, but couldn't be substituted in for the old check or else 2 beefy tests fail.

It seems like there should be a better solution with one check rather than both of these, but I'm not too familiar with Buffer/ArrayBuffer semantics. In any case, this appears to satisfy both requirements -- open to suggestions.