louischatriot/nedb — pull request #128 by jasonrhodes (2014-01-25 02:19:17+00:00)
Title: Upsert return new doc

If { upsert: true } is used on update, and a new document is sucessfully created, it'd be really nice to get that new document returned. Since internally the upsert uses the insert command, it was trivial to hook into the newDoc that insert passes back and send it along to the update callback. This PR includes the code change, updated working tests, and updated README docs. Officially closes #72