UNPKG

@technobuddha/library

Version:
19 lines (18 loc) 566 B
/** * Determines whether the provided value is a string. * * This function checks if the value is a primitive string or a String object. * @param value - The value to check. * @returns True if the value is a string or a String object, otherwise false. * @group Object * @category Type Guards * @example * ```typescript * isString('hello'); // true * isString(new String('hello')); // true * isString(42); // false * isString(['a', 'b']); // false * isString(null); // false * ``` */ export declare function isString(value: unknown): value is string;