Skip to main content
types.isStringObject - util - Node documentation
function types.isStringObject

Usage in Deno

import { types } from "node:util";
isStringObject(object: unknown): object is String

Returns true if the value is a string object, e.g. created by new String().

util.types.isStringObject('foo');  // Returns false
util.types.isStringObject(new String('foo'));   // Returns true

Parameters

object: unknown

Return Type

object is String
Back to top