codetunnel/mongoose-auto-increment — pull request #25 by marksyzm (2014-12-18 15:52:27+00:00)
Title: Update increment value if ID is overridden on new document

Replaced checking of document field (i.e. `_id`) type as a number with checking if document is new (using `isNew` property) - http://mongoosejs.com/docs/api.html#document_Document-isNew.
Added check for provided ID override, where it checks the new ID is greater than the current count, else it increments the current count and sets the document ID with that value.