see https://github.com/daleharvey/pouchdb/blob/master/tests/test.bulk_docs.js#L227-L230