Contributed to open source
https://github.com/pouchdb/pouchdb/pull/4925