diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index b5b82cace3a..d026ed55ac5 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1011,6 +1011,9 @@ The [`util.isBoolean()`][] API is deprecated. -Type: Documentation-only +Type: Runtime The [`util.isBuffer()`][] API is deprecated. Please use [`Buffer.isBuffer()`][] instead. diff --git a/lib/util.js b/lib/util.js index 91485e30530..82ae63eb841 100644 --- a/lib/util.js +++ b/lib/util.js @@ -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')