Skip to content

Commit

Permalink
util: runtime deprecate util.isArray
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
marco-ippolito authored and nodejs-github-bot committed Nov 27, 2023
1 parent 22d8062 commit fbb2f89
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
Expand Up @@ -964,6 +964,9 @@ The [`tls.SecurePair`][] class is deprecated. Please use

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

Type: Documentation-only
Type: Runtime

The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()`
instead.
Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Expand Up @@ -388,7 +388,9 @@ module.exports = {
getSystemErrorName,
inherits,
inspect,
isArray: ArrayIsArray,
isArray: deprecate(ArrayIsArray,
'The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.',
'DEP0044'),
isBoolean,
isBuffer,
isDeepStrictEqual(a, b) {
Expand Down

0 comments on commit fbb2f89

Please sign in to comment.