From 245ba1d658bdbb141ead71c9417f53918101c749 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Mon, 30 Mar 2015 14:34:24 -0400 Subject: [PATCH] doc: fix util.isObject documentation 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 Reviewed-By: Brendan Ashworth --- doc/api/util.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 2bc6969..77d9a8f 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -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) -- 2.7.4