diff --git a/doc/api/util.md b/doc/api/util.md index 47d685b0cac..03ef10ba1aa 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -940,12 +940,12 @@ added: v0.6.0 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use [`Array.isArray()`][] instead. * `object` {any} * Returns: {boolean} -Internal alias for [`Array.isArray`][]. +Alias for [`Array.isArray()`][]. Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. @@ -966,7 +966,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `typeof value === 'boolean'` instead. * `object` {any} * Returns: {boolean} @@ -1078,7 +1078,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `typeof value === 'function'` instead. * `object` {any} * Returns: {boolean} @@ -1106,7 +1106,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `value === null` instead. * `object` {any} * Returns: {boolean} @@ -1131,7 +1131,8 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use +> `value === undefined || value === null` instead. * `object` {any} * Returns: {boolean} @@ -1156,7 +1157,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `typeof value === 'number'` instead. * `object` {any} * Returns: {boolean} @@ -1182,13 +1183,15 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: +> Use `value !== null && typeof value === 'object'` instead. * `object` {any} * Returns: {boolean} Returns `true` if the given `object` is strictly an `Object` **and** not a -`Function`. Otherwise, returns `false`. +`Function` (even though functions are objects in JavaScript). +Otherwise, returns `false`. ```js const util = require('util'); @@ -1209,7 +1212,9 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use +> `(typeof value !== 'object' && typeof value !== 'function') || value === null` +> instead. * `object` {any} * Returns: {boolean} @@ -1270,7 +1275,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `typeof value === 'string'` instead. * `object` {any} * Returns: {boolean} @@ -1296,7 +1301,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `typeof value === 'symbol'` instead. * `object` {any} * Returns: {boolean} @@ -1320,7 +1325,7 @@ added: v0.11.5 deprecated: v4.0.0 --> -> Stability: 0 - Deprecated +> Stability: 0 - Deprecated: Use `value === undefined` instead. * `object` {any} * Returns: {boolean} @@ -1379,7 +1384,7 @@ deprecated: v0.11.3 Deprecated predecessor of `console.log`. [`'uncaughtException'`]: process.html#process_event_uncaughtexception -[`Array.isArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray +[`Array.isArray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray [`Buffer.isBuffer()`]: buffer.html#buffer_class_method_buffer_isbuffer_obj [`Error`]: errors.html#errors_class_error [`Object.assign()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign