documentcloud/underscore-contrib — pull request #102 by joshuacc (2013-11-27 03:52:06+00:00)
Title: Fixes behavior of _.isPlainObject for instances of constructors other than Object

This fixes the behavior of `_.isPlainObject` so that if an object was constructed by anything other than `Object`, it is not considered a plain object.

Currently, for example `_.isPlainObject(new Date)` will return true. And since the comments in the source code indicate that we are explicitly trying to check for object literals, that should probably be false.

With this change, `_.isPlainObject(obj)` will only return true if `obj` was constructed by `Object`.

This also brings it more in line with the behavior of Lo-Dash's implementation.