isString

isString

Check whether the given value is string or not

Import

import { isString } from '@fullstacksjs/toolbox';

Signature

function isString(x: unknown): x is string {}

Examples

isString('')        // true
isString(undefined) // false
isString(null)      // false
isString(1)         // false
isString(['1'])     // false