Here's how I would rewrite getAndRemove using PouchDB's own promises. Note that instead of catching all errors, I'm explicitly catching only 404s. I have to ignore that statement in istanbul, since we can't really reproduce it unless there's a network failure or something like that.
Here's how I would rewrite
getAndRemove
using PouchDB's own promises. Note that instead of catching all errors, I'm explicitly catching only 404s. I have to ignore that statement in istanbul, since we can't really reproduce it unless there's a network failure or something like that.