Skip to content

Commit 3c670cb

Browse files
marco-ippolitonodejs-github-bot
authored andcommitted
util: runtime deprecation util.isBuffer
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 c17a448 commit 3c670cb

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
@@ -1011,6 +1011,9 @@ The [`util.isBoolean()`][] API is deprecated.
10111011

10121012
<!-- YAML
10131013
changes:
1014+
- version: REPLACEME
1015+
pr-url: https://github.com/nodejs/node/pull/50488
1016+
description: Runtime deprecation.
10141017
- version:
10151018
- v6.12.0
10161019
- v4.8.6
@@ -1023,7 +1026,7 @@ changes:
10231026
description: Documentation-only deprecation.
10241027
-->
10251028

1026-
Type: Documentation-only
1029+
Type: Runtime
10271030

10281031
The [`util.isBuffer()`][] API is deprecated. Please use
10291032
[`Buffer.isBuffer()`][] instead.

lib/util.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ module.exports = {
394394
isBoolean: deprecate(isBoolean,
395395
'The `util.isBoolean` API is deprecated. Please use `typeof arg === "boolean"` instead.',
396396
'DEP0045'),
397-
isBuffer: deprecate(isBuffer, 'The `util.isBuffer API is deprecated.', 'DEP0046'),
397+
isBuffer: deprecate(isBuffer,
398+
'The `util.isBuffer` API is deprecated. Please use `Buffer.isBuffer()` instead.',
399+
'DEP0046'),
398400
isDeepStrictEqual(a, b) {
399401
if (internalDeepEqual === undefined) {
400402
internalDeepEqual = require('internal/util/comparisons')

0 commit comments

Comments
 (0)