Skip to content

Commit

Permalink
util: runtime deprecate util.isObject
Browse files Browse the repository at this point in the history
PR-URL: #50488
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
marco-ippolito authored and nodejs-github-bot committed Nov 27, 2023
1 parent b05b1dd commit 5478e11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,9 @@ The [`util.isNumber()`][] API is deprecated.

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/50488
description: Runtime deprecation.
- version:
- v6.12.0
- v4.8.6
Expand All @@ -1187,7 +1190,7 @@ changes:
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Runtime

The [`util.isObject()`][] API is deprecated.

Expand Down
3 changes: 2 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ module.exports = {
'The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.',
'DEP0055'),
isObject: deprecate(isObject,
'The `util.isObject` API is deprecated. Please use `typeof arg === "object"` instead.',
'The `util.isObject` API is deprecated. ' +
'Please use `arg !== null && typeof arg === "object"` instead.',
'DEP0053'),
isDate: deprecate(types.isDate,
'The `util.isDate API is deprecated. Please use `arg instanceof Error` instead.',
Expand Down

0 comments on commit 5478e11

Please sign in to comment.