doc: fix util.isObject documentation
authorJeremiah Senkpiel <fishrock123@rocketmail.com>
Mon, 30 Mar 2015 18:34:24 +0000 (14:34 -0400)
committerJeremiah Senkpiel <fishrock123@rocketmail.com>
Tue, 31 Mar 2015 14:51:23 +0000 (10:51 -0400)
Proposed functionality fix containing prior discussion:
https://github.com/iojs/io.js/pull/822

Fixes: https://github.com/iojs/io.js/issues/743
PR-URL: https://github.com/iojs/io.js/pull/1295
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
doc/api/util.markdown

index 2bc6969..77d9a8f 100644 (file)
@@ -328,7 +328,8 @@ Returns `true` if the given "object" is `undefined`. `false` otherwise.
 
 ## util.isObject(object)
 
-Returns `true` if the given "object" is strictly an `Object`. `false` otherwise.
+Returns `true` if the given "object" is strictly an `Object` __and__ not a
+`Function`. `false` otherwise.
 
     var util = require('util');
 
@@ -338,6 +339,8 @@ Returns `true` if the given "object" is strictly an `Object`. `false` otherwise.
       // false
     util.isObject({})
       // true
+    util.isObject(function(){})
+      // false
 
 
 ## util.isFunction(object)