File tree Expand file tree Collapse file tree 4 files changed +5
-45
lines changed
Expand file tree Collapse file tree 4 files changed +5
-45
lines changed Original file line number Diff line number Diff line change @@ -1277,6 +1277,9 @@ The [`util.isRegExp()`][] API is deprecated. Please use
12771277
12781278<!-- YAML
12791279changes:
1280+ - version: REPLACEME
1281+ pr-url: https://github.com/nodejs/node/pull/52744
1282+ description: End-of-Life deprecation.
12801283 - version: v22.0.0
12811284 pr-url: https://github.com/nodejs/node/pull/50488
12821285 description: Runtime deprecation.
@@ -1292,9 +1295,9 @@ changes:
12921295 description: Documentation-only deprecation.
12931296-->
12941297
1295- Type: Runtime
1298+ Type: End-of-Life
12961299
1297- The [ ` util.isString() ` ] [ ] API is deprecated . Please use
1300+ The ` util.isString() ` API has been removed . Please use
12981301` typeof arg === 'string' ` instead.
12991302
13001303### DEP0057: ` util.isSymbol() `
@@ -3796,7 +3799,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][].
37963799[ `util.isObject()` ] : util.md#utilisobjectobject
37973800[ `util.isPrimitive()` ] : util.md#utilisprimitiveobject
37983801[ `util.isRegExp()` ] : util.md#utilisregexpobject
3799- [ `util.isString()` ] : util.md#utilisstringobject
38003802[ `util.isSymbol()` ] : util.md#utilissymbolobject
38013803[ `util.isUndefined()` ] : util.md#utilisundefinedobject
38023804[ `util.log()` ] : util.md#utillogstring
Original file line number Diff line number Diff line change @@ -3140,33 +3140,6 @@ util.isRegExp({});
31403140// Returns: false
31413141` ` `
31423142
3143- ### ` util .isString (object)`
3144-
3145- <!-- YAML
3146- added: v0.11.5
3147- deprecated: v4.0.0
3148- -->
3149-
3150- > Stability: 0 - Deprecated: Use ` typeof value === ' string' ` instead.
3151-
3152- * ` object` {any}
3153- * Returns: {boolean}
3154-
3155- Returns ` true ` if the given ` object` is a ` string` . Otherwise, returns ` false ` .
3156-
3157- ` ` ` js
3158- const util = require (' node:util' );
3159-
3160- util .isString (' ' );
3161- // Returns: true
3162- util .isString (' foo' );
3163- // Returns: true
3164- util .isString (String (' foo' ));
3165- // Returns: true
3166- util .isString (5 );
3167- // Returns: false
3168- ` ` `
3169-
31703143### ` util .isSymbol (object)`
31713144
31723145<!-- YAML
Original file line number Diff line number Diff line change @@ -90,14 +90,6 @@ function lazyAbortController() {
9090
9191let internalDeepEqual ;
9292
93- /**
94- * @param {any } arg
95- * @returns {arg is string }
96- */
97- function isString ( arg ) {
98- return typeof arg === 'string' ;
99- }
100-
10193/**
10294 * @deprecated since v4.0.0
10395 * @param {any } arg
@@ -389,9 +381,6 @@ module.exports = {
389381 }
390382 return internalDeepEqual ( a , b ) ;
391383 } ,
392- isString : deprecate ( isString ,
393- 'The `util.isString` API is deprecated. Please use `typeof arg === "string"` instead.' ,
394- 'DEP0056' ) ,
395384 isSymbol : deprecate ( isSymbol ,
396385 'The `util.isSymbol` API is deprecated. Please use `arg === "symbol"` instead.' ,
397386 'DEP0057' ) ,
Original file line number Diff line number Diff line change @@ -103,10 +103,6 @@ assert.strictEqual(util.isUndefined(), true);
103103assert . strictEqual ( util . isUndefined ( null ) , false ) ;
104104assert . strictEqual ( util . isUndefined ( 'string' ) , false ) ;
105105
106- assert . strictEqual ( util . isString ( 'string' ) , true ) ;
107- assert . strictEqual ( util . isString ( ) , false ) ;
108- assert . strictEqual ( util . isString ( 42 ) , false ) ;
109-
110106assert . strictEqual ( util . isSymbol ( Symbol ( ) ) , true ) ;
111107assert . strictEqual ( util . isSymbol ( ) , false ) ;
112108assert . strictEqual ( util . isSymbol ( 'string' ) , false ) ;
You can’t perform that action at this time.
0 commit comments