GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — util: move util.isNull to eol · nodejs/node@7cd8bb2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • deprecations.md
    • util.md
  • lib
    • util.js
  • test/parallel
    • test-util.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+5-3Lines changed: 5 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,9 @@ The [`util.isFunction()`][] API is deprecated. Please use
11231123

11241124
<!-- YAML
11251125
changes:
1126+
- version: REPLACEME
1127+
pr-url: https://github.com/nodejs/node/pull/52744
1128+
description: End-of-Life deprecation.
11261129
- version: v22.0.0
11271130
pr-url: https://github.com/nodejs/node/pull/50488
11281131
description: Runtime deprecation.
@@ -1138,9 +1141,9 @@ changes:
11381141
description: Documentation-only deprecation.
11391142
-->
11401143

1141-
Type: Runtime
1144+
Type: End-of-Life
11421145

1143-
The [`util.isNull()`][] API is deprecated. Please use
1146+
The `util.isNull()` API has been removed. Please use
11441147
`arg === null` instead.
11451148

11461149
### DEP0051: `util.isNullOrUndefined()`
@@ -3784,7 +3787,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][].
37843787
[`util.isArray()`]: util.md#utilisarrayobject
37853788
[`util.isError()`]: util.md#utiliserrorobject
37863789
[`util.isFunction()`]: util.md#utilisfunctionobject
3787-
[`util.isNull()`]: util.md#utilisnullobject
37883790
[`util.isNullOrUndefined()`]: util.md#utilisnullorundefinedobject
37893791
[`util.isNumber()`]: util.md#utilisnumberobject
37903792
[`util.isObject()`]: util.md#utilisobjectobject
Collapse file

‎doc/api/util.md‎

Copy file name to clipboardExpand all lines: doc/api/util.md
-26Lines changed: 0 additions & 26 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3045,32 +3045,6 @@ util.isFunction(Bar);
30453045
// Returns: true
30463046
```
30473047
3048-
### `util.isNull(object)`
3049-
3050-
<!-- YAML
3051-
added: v0.11.5
3052-
deprecated: v4.0.0
3053-
-->
3054-
3055-
> Stability: 0 - Deprecated: Use `value === null` instead.
3056-
3057-
* `object` {any}
3058-
* Returns: {boolean}
3059-
3060-
Returns `true` if the given `object` is strictly `null`. Otherwise, returns
3061-
`false`.
3062-
3063-
```js
3064-
const util = require('node:util');
3065-
3066-
util.isNull(0);
3067-
// Returns: false
3068-
util.isNull(undefined);
3069-
// Returns: false
3070-
util.isNull(null);
3071-
// Returns: true
3072-
```
3073-
30743048
### `util.isNullOrUndefined(object)`
30753049
30763050
<!-- YAML
Collapse file

‎lib/util.js‎

Copy file name to clipboardExpand all lines: lib/util.js
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ function lazyAbortController() {
9090

9191
let internalDeepEqual;
9292

93-
/**
94-
* @deprecated since v4.0.0
95-
* @param {any} arg
96-
* @returns {arg is null}
97-
*/
98-
function isNull(arg) {
99-
return arg === null;
100-
}
101-
10293
/**
10394
* @deprecated since v4.0.0
10495
* @param {any} arg
@@ -416,9 +407,6 @@ module.exports = {
416407
}
417408
return internalDeepEqual(a, b);
418409
},
419-
isNull: deprecate(isNull,
420-
'The `util.isNull` API is deprecated. Please use `arg === null` instead.',
421-
'DEP0050'),
422410
isNullOrUndefined: deprecate(isNullOrUndefined,
423411
'The `util.isNullOrUndefined` API is deprecated. ' +
424412
'Please use `arg === null || arg === undefined` instead.',
Collapse file

‎test/parallel/test-util.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util.js
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ assert.strictEqual(util.isPrimitive(Infinity), true);
9898
assert.strictEqual(util.isPrimitive(NaN), true);
9999
assert.strictEqual(util.isPrimitive(Symbol('symbol')), true);
100100

101-
assert.strictEqual(util.isNull(null), true);
102-
assert.strictEqual(util.isNull(undefined), false);
103-
assert.strictEqual(util.isNull(), false);
104-
assert.strictEqual(util.isNull('string'), false);
105-
106101
assert.strictEqual(util.isUndefined(undefined), true);
107102
assert.strictEqual(util.isUndefined(), true);
108103
assert.strictEqual(util.isUndefined(null), false);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.