Skip to content

Commit 245ba1d

Browse files
committed
doc: fix util.isObject documentation
Proposed functionality fix containing prior discussion: #822 Fixes: #743 PR-URL: #1295 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brendan Ashworth <[email protected]>
1 parent 0bd4fe9 commit 245ba1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/util.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ Returns `true` if the given "object" is `undefined`. `false` otherwise.
328328

329329
## util.isObject(object)
330330

331-
Returns `true` if the given "object" is strictly an `Object`. `false` otherwise.
331+
Returns `true` if the given "object" is strictly an `Object` __and__ not a
332+
`Function`. `false` otherwise.
332333

333334
var util = require('util');
334335

@@ -338,6 +339,8 @@ Returns `true` if the given "object" is strictly an `Object`. `false` otherwise.
338339
// false
339340
util.isObject({})
340341
// true
342+
util.isObject(function(){})
343+
// false
341344

342345

343346
## util.isFunction(object)

0 commit comments

Comments
 (0)