LearnBoost/monk — pull request #69 by adamvr (2014-05-27 12:06:24+00:00)
Title: Add collection save method

I'm taking some inspiration from https://github.com/marcello3d/node-mongolian here, in that we don't call the native mongo save and instead choose update or insert based on the presence of an _id field. This is mostly because the value returned by mongo from save (and update for that matter) isn't very useful (we get the number of saved/updated documents back). In this implementation, we return either the inserted document when _id is present, or the document passed to save when it isn't.

Refs: #53 #43