Skip to content

Commit

Permalink
util: runtime deprecation util.isBuffer
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 c17a448 commit 3c670cb
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 @@ -1011,6 +1011,9 @@ The [`util.isBoolean()`][] API is deprecated.

<!-- 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 @@ -1023,7 +1026,7 @@ changes:
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Runtime

The [`util.isBuffer()`][] API is deprecated. Please use
[`Buffer.isBuffer()`][] instead.
Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ module.exports = {
isBoolean: deprecate(isBoolean,
'The `util.isBoolean` API is deprecated. Please use `typeof arg === "boolean"` instead.',
'DEP0045'),
isBuffer: deprecate(isBuffer, 'The `util.isBuffer API is deprecated.', 'DEP0046'),
isBuffer: deprecate(isBuffer,
'The `util.isBuffer` API is deprecated. Please use `Buffer.isBuffer()` instead.',
'DEP0046'),
isDeepStrictEqual(a, b) {
if (internalDeepEqual === undefined) {
internalDeepEqual = require('internal/util/comparisons')
Expand Down

0 comments on commit 3c670cb

Please sign in to comment.