Skip to content

Commit c17a448

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

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

doc/api/deprecations.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,9 @@ instead.
988988

989989
<!-- YAML
990990
changes:
991+
- version: REPLACEME
992+
pr-url: https://github.com/nodejs/node/pull/50488
993+
description: Runtime deprecation.
991994
- version:
992995
- v6.12.0
993996
- v4.8.6
@@ -1000,7 +1003,7 @@ changes:
10001003
description: Documentation-only deprecation.
10011004
-->
10021005

1003-
Type: Documentation-only
1006+
Type: Runtime
10041007

10051008
The [`util.isBoolean()`][] API is deprecated.
10061009

lib/util.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,10 @@ module.exports = {
391391
isArray: deprecate(ArrayIsArray,
392392
'The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.',
393393
'DEP0044'),
394-
isBoolean,
395-
isBuffer,
394+
isBoolean: deprecate(isBoolean,
395+
'The `util.isBoolean` API is deprecated. Please use `typeof arg === "boolean"` instead.',
396+
'DEP0045'),
397+
isBuffer: deprecate(isBuffer, 'The `util.isBuffer API is deprecated.', 'DEP0046'),
396398
isDeepStrictEqual(a, b) {
397399
if (internalDeepEqual === undefined) {
398400
internalDeepEqual = require('internal/util/comparisons')

0 commit comments

Comments
 (0)