File tree Expand file tree Collapse file tree 4 files changed +5
-48
lines changed Expand file tree Collapse file tree 4 files changed +5
-48
lines changed Original file line number Diff line number Diff line change @@ -1105,6 +1105,9 @@ instead.
11051105
11061106<!-- YAML
11071107changes:
1108+ - version: REPLACEME
1109+ pr-url: https://github.com/nodejs/node/pull/52744
1110+ description: End-of-Life deprecation.
11081111 - version: v22.0.0
11091112 pr-url: https://github.com/nodejs/node/pull/50488
11101113 description: Runtime deprecation.
@@ -1120,9 +1123,9 @@ changes:
11201123 description: Documentation-only deprecation.
11211124-->
11221125
1123- Type: Runtime
1126+ Type: End-of-Life
11241127
1125- The [ ` util.isFunction() ` ] [ ] API is deprecated . Please use
1128+ The ` util.isFunction() ` API has been removed . Please use
11261129` typeof arg === 'function' ` instead.
11271130
11281131### DEP0050: ` util.isNull() `
Original file line number Diff line number Diff line change @@ -2950,35 +2950,6 @@ util.isArray({});
29502950// Returns: false
29512951` ` `
29522952
2953- ### ` util .isFunction (object)`
2954-
2955- <!-- YAML
2956- added: v0.11.5
2957- deprecated: v4.0.0
2958- -->
2959-
2960- > Stability: 0 - Deprecated: Use ` typeof value === ' function' ` instead.
2961-
2962- * ` object` {any}
2963- * Returns: {boolean}
2964-
2965- Returns ` true ` if the given ` object` is a ` Function ` . Otherwise, returns
2966- ` false ` .
2967-
2968- ` ` ` js
2969- const util = require (' node:util' );
2970-
2971- function Foo () {}
2972- const Bar = () => {};
2973-
2974- util .isFunction ({});
2975- // Returns: false
2976- util .isFunction (Foo);
2977- // Returns: true
2978- util .isFunction (Bar);
2979- // Returns: true
2980- ` ` `
2981-
29822953### ` util .isPrimitive (object)`
29832954
29842955<!-- YAML
Original file line number Diff line number Diff line change @@ -89,15 +89,6 @@ function lazyAbortController() {
8989
9090let internalDeepEqual ;
9191
92- /**
93- * @deprecated since v4.0.0
94- * @param {any } arg
95- * @returns {arg is Function }
96- */
97- function isFunction ( arg ) {
98- return typeof arg === 'function' ;
99- }
100-
10192/**
10293 * @deprecated since v4.0.0
10394 * @param {any } arg
@@ -344,9 +335,6 @@ module.exports = {
344335 }
345336 return internalDeepEqual ( a , b ) ;
346337 } ,
347- isFunction : deprecate ( isFunction ,
348- 'The `util.isFunction` API is deprecated. Please use `typeof arg === "function"` instead.' ,
349- 'DEP0049' ) ,
350338 isPrimitive : deprecate ( isPrimitive ,
351339 'The `util.isPrimitive` API is deprecated. ' +
352340 'Please use `arg === null || ' +
Original file line number Diff line number Diff line change @@ -57,11 +57,6 @@ assert.strictEqual(util.isPrimitive(Infinity), true);
5757assert . strictEqual ( util . isPrimitive ( NaN ) , true ) ;
5858assert . strictEqual ( util . isPrimitive ( Symbol ( 'symbol' ) ) , true ) ;
5959
60- assert . strictEqual ( util . isFunction ( ( ) => { } ) , true ) ;
61- assert . strictEqual ( util . isFunction ( function ( ) { } ) , true ) ;
62- assert . strictEqual ( util . isFunction ( ) , false ) ;
63- assert . strictEqual ( util . isFunction ( 'string' ) , false ) ;
64-
6560assert . strictEqual ( util . toUSVString ( 'string\ud801' ) , 'string\ufffd' ) ;
6661
6762{
You can’t perform that action at this time.
0 commit comments