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 <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>
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

+4-1
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

+3-1
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)