Skip to content

Commit

Permalink
util: runtime deprecate util.isFunction
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 7c69c33 commit 70330f5
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -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
Expand All @@ -1095,7 +1098,7 @@ changes:
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Runtime

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

Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 70330f5

Please sign in to comment.