Use the same promise based api for CouchDB and PouchDB, on nodejs and in the browser.