Skip to content

Commit 70330f5

Browse files
marco-ippolitonodejs-github-bot
authored andcommitted
util: runtime deprecate util.isFunction
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]>
1 parent 7c69c33 commit 70330f5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/api/deprecations.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,9 @@ instead.
10831083

10841084
<!-- YAML
10851085
changes:
1086+
- version: REPLACEME
1087+
pr-url: https://github.com/nodejs/node/pull/50488
1088+
description: Runtime deprecation.
10861089
- version:
10871090
- v6.12.0
10881091
- v4.8.6
@@ -1095,7 +1098,7 @@ changes:
10951098
description: Documentation-only deprecation.
10961099
-->
10971100

1098-
Type: Documentation-only
1101+
Type: Runtime
10991102

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

lib/util.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ module.exports = {
437437
'Please use `ObjectPrototypeToString(e) === "[object Error]" ' +
438438
'|| e instanceof Error` instead.',
439439
'DEP0048'),
440-
isFunction: deprecate(isFunction, 'The `util.isFunction API is deprecated.', 'DEP0049'),
440+
isFunction: deprecate(isFunction,
441+
'The `util.isFunction` API is deprecated. Please use `typeof arg === "function"` instead.',
442+
'DEP0049'),
441443
isPrimitive: deprecate(isPrimitive, 'The `util.isPrimitive API is deprecated.', 'DEP0054'),
442444
log: deprecate(log, 'The `util.log API is deprecated.', 'DEP0059'),
443445
promisify,

0 commit comments

Comments
 (0)