util: runtime deprecate util.isFunction

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:48:45 +02:00
committed by Node.js GitHub Bot
parent 7c69c33acc
commit 70330f5c2b
2 changed files with 7 additions and 2 deletions

View File

@@ -1083,6 +1083,9 @@ instead.
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/50488
description: Runtime deprecation.
- version:
- v6.12.0
- v4.8.6
@@ -1095,7 +1098,7 @@ changes:
description: Documentation-only deprecation.
-->
Type: Documentation-only
Type: Runtime
The [`util.isFunction()`][] API is deprecated.

View File

@@ -437,7 +437,9 @@ module.exports = {
'Please use `ObjectPrototypeToString(e) === "[object Error]" ' +
'|| e instanceof Error` instead.',
'DEP0048'),
isFunction: deprecate(isFunction, 'The `util.isFunction API is deprecated.', 'DEP0049'),
isFunction: deprecate(isFunction,
'The `util.isFunction` API is deprecated. Please use `typeof arg === "function"` instead.',
'DEP0049'),
isPrimitive: deprecate(isPrimitive, 'The `util.isPrimitive API is deprecated.', 'DEP0054'),
log: deprecate(log, 'The `util.log API is deprecated.', 'DEP0059'),
promisify,