diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 01ed6fa7c5b..b5b82cace3a 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -988,6 +988,9 @@ instead. -Type: Documentation-only +Type: Runtime The [`util.isBoolean()`][] API is deprecated. diff --git a/lib/util.js b/lib/util.js index 2bb310830fb..91485e30530 100644 --- a/lib/util.js +++ b/lib/util.js @@ -391,8 +391,10 @@ module.exports = { isArray: deprecate(ArrayIsArray, 'The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.', 'DEP0044'), - isBoolean, - isBuffer, + 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'), isDeepStrictEqual(a, b) { if (internalDeepEqual === undefined) { internalDeepEqual = require('internal/util/comparisons')