GoogleCloudPlatform/gcloud-node — pull request #152 by ryanseys (2014-08-29 16:57:15+00:00)
Title: Reorder util.extend logic, fixing dead code

If you passed in anything other than an `Object` or `Array`, it would just `return from`, skipping over the code below making it always dead for that case. The two checks cannot coincide, so I just reordered them.

I added a test using the Date type as an example of how it wouldn't work in the old case.

That all being said, what is the point in having the big check anyway? Can we just `return from` and remove the other checks altogether? For example, you cannot copy a function in the same way that you copy a Date. For built in types, we should just return itself.

Thoughts?