File tree 4 files changed +5
-48
lines changed
4 files changed +5
-48
lines changed Original file line number Diff line number Diff line change @@ -1105,6 +1105,9 @@ instead.
1105
1105
1106
1106
<!-- YAML
1107
1107
changes:
1108
+ - version: REPLACEME
1109
+ pr-url: https://github.com/nodejs/node/pull/52744
1110
+ description: End-of-Life deprecation.
1108
1111
- version: v22.0.0
1109
1112
pr-url: https://github.com/nodejs/node/pull/50488
1110
1113
description: Runtime deprecation.
@@ -1120,9 +1123,9 @@ changes:
1120
1123
description: Documentation-only deprecation.
1121
1124
-->
1122
1125
1123
- Type: Runtime
1126
+ Type: End-of-Life
1124
1127
1125
- The [ ` util.isFunction() ` ] [ ] API is deprecated . Please use
1128
+ The ` util.isFunction() ` API has been removed . Please use
1126
1129
` typeof arg === 'function' ` instead.
1127
1130
1128
1131
### DEP0050: ` util.isNull() `
Original file line number Diff line number Diff line change @@ -2950,35 +2950,6 @@ util.isArray({});
2950
2950
// Returns: false
2951
2951
` ` `
2952
2952
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
-
2982
2953
### ` util .isPrimitive (object)`
2983
2954
2984
2955
<!-- YAML
Original file line number Diff line number Diff line change @@ -89,15 +89,6 @@ function lazyAbortController() {
89
89
90
90
let internalDeepEqual ;
91
91
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
-
101
92
/**
102
93
* @deprecated since v4.0.0
103
94
* @param {any } arg
@@ -344,9 +335,6 @@ module.exports = {
344
335
}
345
336
return internalDeepEqual ( a , b ) ;
346
337
} ,
347
- isFunction : deprecate ( isFunction ,
348
- 'The `util.isFunction` API is deprecated. Please use `typeof arg === "function"` instead.' ,
349
- 'DEP0049' ) ,
350
338
isPrimitive : deprecate ( isPrimitive ,
351
339
'The `util.isPrimitive` API is deprecated. ' +
352
340
'Please use `arg === null || ' +
Original file line number Diff line number Diff line change @@ -57,11 +57,6 @@ assert.strictEqual(util.isPrimitive(Infinity), true);
57
57
assert . strictEqual ( util . isPrimitive ( NaN ) , true ) ;
58
58
assert . strictEqual ( util . isPrimitive ( Symbol ( 'symbol' ) ) , true ) ;
59
59
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
-
65
60
assert . strictEqual ( util . toUSVString ( 'string\ud801' ) , 'string\ufffd' ) ;
66
61
67
62
{
You can’t perform that action at this time.
0 commit comments