redgeoff / delta-pouch

Conflict-free collaborative editing for PouchDB
196 stars 13 forks source link

fix(getAndRemove): clean up with promises #9

Closed nolanlawson closed 10 years ago

nolanlawson commented 10 years ago

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.