Express Sweet API Reference - v3.0.0
    Preparing search index...

    Variable isString

    isString: (value: any) => boolean

    Check if a value is a non-empty string. Returns true only for strings with content, false for empty strings or other types.

    Type Declaration

      • (value: any): boolean
      • Parameters

        • value: any

          The value to check

        Returns boolean

        Returns true if value is a non-empty string, false otherwise

    import isString from '~/utils/isString';

    isString('hello'); // true
    isString(''); // false (empty string)
    isString(' '); // true (space is content)
    isString(123); // false
    isString(null); // false