util: runtime deprecate util.isObject

PR-URL: https://github.com/nodejs/node/pull/50488
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Marco Ippolito
2023-10-31 12:55:32 +02:00
committed by Node.js GitHub Bot
parent b05b1dd541
commit 5478e1129a
2 changed files with 6 additions and 2 deletions

View File

@@ -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
@@ -1187,7 +1190,7 @@ changes:
description: Documentation-only deprecation.
-->
Type: Documentation-only
Type: Runtime
The [`util.isObject()`][] API is deprecated.

View File

@@ -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.',