File tree Expand file tree Collapse file tree 4 files changed +5
-41
lines changed Expand file tree Collapse file tree 4 files changed +5
-41
lines changed Original file line number Diff line number Diff line change @@ -1256,6 +1256,9 @@ instead.
1256
1256
1257
1257
<!-- YAML
1258
1258
changes:
1259
+ - version: REPLACEME
1260
+ pr-url: https://github.com/nodejs/node/pull/52744
1261
+ description: End-of-Life deprecation.
1259
1262
- version: v22.0.0
1260
1263
pr-url: https://github.com/nodejs/node/pull/50488
1261
1264
description: Runtime deprecation.
@@ -1271,9 +1274,9 @@ changes:
1271
1274
description: Documentation-only deprecation.
1272
1275
-->
1273
1276
1274
- Type: Runtime
1277
+ Type: End-of-Life
1275
1278
1276
- The [ ` util.isRegExp() ` ] [ ] API is deprecated . Please use
1279
+ The ` util.isRegExp() ` API has been removed . Please use
1277
1280
` arg instanceof RegExp ` instead.
1278
1281
1279
1282
### DEP0056: ` util.isString() `
@@ -3802,7 +3805,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][].
3802
3805
[ `util.isFunction()` ] : util.md#utilisfunctionobject
3803
3806
[ `util.isObject()` ] : util.md#utilisobjectobject
3804
3807
[ `util.isPrimitive()` ] : util.md#utilisprimitiveobject
3805
- [ `util.isRegExp()` ] : util.md#utilisregexpobject
3806
3808
[ `util.log()` ] : util.md#utillogstring
3807
3809
[ `util.promisify` ] : util.md#utilpromisifyoriginal
3808
3810
[ `util.toUSVString()` ] : util.md#utiltousvstringstring
Original file line number Diff line number Diff line change @@ -3088,31 +3088,6 @@ util.isPrimitive(new Date());
3088
3088
// Returns: false
3089
3089
` ` `
3090
3090
3091
- ### ` util .isRegExp (object)`
3092
-
3093
- <!-- YAML
3094
- added: v0.6.0
3095
- deprecated: v4.0.0
3096
- -->
3097
-
3098
- > Stability: 0 - Deprecated
3099
-
3100
- * ` object` {any}
3101
- * Returns: {boolean}
3102
-
3103
- Returns ` true ` if the given ` object` is a ` RegExp ` . Otherwise, returns ` false ` .
3104
-
3105
- ` ` ` js
3106
- const util = require (' node:util' );
3107
-
3108
- util .isRegExp (/ some regexp/ );
3109
- // Returns: true
3110
- util .isRegExp (new RegExp (' another regexp' ));
3111
- // Returns: true
3112
- util .isRegExp ({});
3113
- // Returns: false
3114
- ` ` `
3115
-
3116
3091
### ` util .log (string)`
3117
3092
3118
3093
<!-- YAML
Original file line number Diff line number Diff line change @@ -360,9 +360,6 @@ module.exports = {
360
360
}
361
361
return internalDeepEqual ( a , b ) ;
362
362
} ,
363
- isRegExp : deprecate ( types . isRegExp ,
364
- 'The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.' ,
365
- 'DEP0055' ) ,
366
363
isObject : deprecate ( isObject ,
367
364
'The `util.isObject` API is deprecated. ' +
368
365
'Please use `arg !== null && typeof arg === "object"` instead.' ,
Original file line number Diff line number Diff line change @@ -27,16 +27,6 @@ const util = require('util');
27
27
const errors = require ( 'internal/errors' ) ;
28
28
const context = require ( 'vm' ) . runInNewContext ;
29
29
30
- // isRegExp
31
- assert . strictEqual ( util . isRegExp ( / r e g e x p / ) , true ) ;
32
- assert . strictEqual ( util . isRegExp ( RegExp ( ) , 'foo' ) , true ) ;
33
- assert . strictEqual ( util . isRegExp ( new RegExp ( ) ) , true ) ;
34
- assert . strictEqual ( util . isRegExp ( context ( 'RegExp' ) ( ) ) , true ) ;
35
- assert . strictEqual ( util . isRegExp ( { } ) , false ) ;
36
- assert . strictEqual ( util . isRegExp ( [ ] ) , false ) ;
37
- assert . strictEqual ( util . isRegExp ( new Date ( ) ) , false ) ;
38
- assert . strictEqual ( util . isRegExp ( { __proto__ : RegExp . prototype } ) , false ) ;
39
-
40
30
// isDate
41
31
assert . strictEqual ( util . isDate ( new Date ( ) ) , true ) ;
42
32
assert . strictEqual ( util . isDate ( new Date ( 0 ) , 'foo' ) , true ) ;
You can’t perform that action at this time.
0 commit comments