Skip to main content

Function: isString()

isString(value): value is string

Defined in: utilities/is-string.ts:10

Checks if the provided value is a string.

Parameters​

value​

unknown

The value to check.

Returns​

value is string

True if the value is a string, false otherwise.

Example​

isString('hello'); // returns true
isString(123); // returns false