diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 315ba4a44ac41d..3b26ca8cc44eaa 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1277,6 +1277,9 @@ The [`util.isRegExp()`][] API is deprecated. Please use -Type: Runtime +Type: End-of-Life -The [`util.isString()`][] API is deprecated. Please use +The `util.isString()` API has been removed. Please use `typeof arg === 'string'` instead. ### DEP0057: `util.isSymbol()` @@ -3796,7 +3799,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][]. [`util.isObject()`]: util.md#utilisobjectobject [`util.isPrimitive()`]: util.md#utilisprimitiveobject [`util.isRegExp()`]: util.md#utilisregexpobject -[`util.isString()`]: util.md#utilisstringobject [`util.isSymbol()`]: util.md#utilissymbolobject [`util.isUndefined()`]: util.md#utilisundefinedobject [`util.log()`]: util.md#utillogstring diff --git a/doc/api/util.md b/doc/api/util.md index 8798e39e1de80b..05c803c7a66b27 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -3140,33 +3140,6 @@ util.isRegExp({}); // Returns: false ``` -### `util.isString(object)` - - - -> Stability: 0 - Deprecated: Use `typeof value === 'string'` instead. - -* `object` {any} -* Returns: {boolean} - -Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. - -```js -const util = require('node:util'); - -util.isString(''); -// Returns: true -util.isString('foo'); -// Returns: true -util.isString(String('foo')); -// Returns: true -util.isString(5); -// Returns: false -``` - ### `util.isSymbol(object)`