From 7cd8bb26d1e9f292af74b2a0d86dc025cbd7f458 Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Mon, 29 Apr 2024 10:33:39 +0200 Subject: [PATCH] util: move util.isNull to eol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/52744 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yagiz Nizipli Reviewed-By: Matteo Collina Reviewed-By: Rafael Gonzaga Reviewed-By: Ulises Gascón Reviewed-By: Paolo Insogna Reviewed-By: Trivikram Kamat Reviewed-By: Moshe Atlow Reviewed-By: James M Snell --- doc/api/deprecations.md | 8 +++++--- doc/api/util.md | 26 -------------------------- lib/util.js | 12 ------------ test/parallel/test-util.js | 5 ----- 4 files changed, 5 insertions(+), 46 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 1852bfadb70779..9fd2794f3a48a4 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1123,6 +1123,9 @@ The [`util.isFunction()`][] API is deprecated. Please use -Type: Runtime +Type: End-of-Life -The [`util.isNull()`][] API is deprecated. Please use +The `util.isNull()` API has been removed. Please use `arg === null` instead. ### DEP0051: `util.isNullOrUndefined()` @@ -3784,7 +3787,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][]. [`util.isArray()`]: util.md#utilisarrayobject [`util.isError()`]: util.md#utiliserrorobject [`util.isFunction()`]: util.md#utilisfunctionobject -[`util.isNull()`]: util.md#utilisnullobject [`util.isNullOrUndefined()`]: util.md#utilisnullorundefinedobject [`util.isNumber()`]: util.md#utilisnumberobject [`util.isObject()`]: util.md#utilisobjectobject diff --git a/doc/api/util.md b/doc/api/util.md index 7eac4afa2c7835..ec6892ebb1043a 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -3045,32 +3045,6 @@ util.isFunction(Bar); // Returns: true ``` -### `util.isNull(object)` - - - -> Stability: 0 - Deprecated: Use `value === null` instead. - -* `object` {any} -* Returns: {boolean} - -Returns `true` if the given `object` is strictly `null`. Otherwise, returns -`false`. - -```js -const util = require('node:util'); - -util.isNull(0); -// Returns: false -util.isNull(undefined); -// Returns: false -util.isNull(null); -// Returns: true -``` - ### `util.isNullOrUndefined(object)`