Variable IsObjConst

IsObj: {
    defined(val: unknown, ...args: unknown[]): val is Object;
    exist(val?: unknown, ...args: unknown[]): val is Object;
    false(val: unknown, ...args: unknown[]): boolean;
    falsy(val: unknown, ...args: unknown[]): boolean;
    function(val: unknown, ...args: unknown[]): val is Function;
    null(val: unknown, ...args: unknown[]): val is null;
    stringContaining(thisStr: string, queryStr: string): boolean;
    true(val: unknown, ...args: unknown[]): boolean;
    truly(val: unknown, ...args: unknown[]): boolean;
    undefined(val: unknown, ...args: unknown[]): val is undefined;
} = ...

A utility object containing various type checking and validation functions. Provides methods to check if values are defined, null, functions, truthy/falsy, etc. Also includes derivative methods like not, all, and any for more complex validations.

Type declaration

  • defined:function
    • Checks if a value is defined (not undefined).

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns val is Object

      True if the value is not undefined

  • exist:function
    • Checks if a value exists (is neither null nor undefined).

      Parameters

      • Optionalval: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns val is Object

      True if the value is not null and not undefined

  • false:function
    • Checks if a value is strictly equal to false.

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns boolean

      True if the value is exactly false

  • falsy:function
    • Checks if a value is falsy (converts to false in boolean context).

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns boolean

      True if the value is falsy

  • function:function
    • Checks if a value is a function.

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns val is Function

      True if the value is a function

  • null:function
    • Checks if a value is null.

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns val is null

      True if the value is null

  • stringContaining:function
    • Checks if a string contains another string.

      Parameters

      • thisStr: string

        The string to search in

      • queryStr: string

        The string to search for

      Returns boolean

      True if thisStr contains queryStr

  • true:function
    • Checks if a value is strictly equal to true.

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns boolean

      True if the value is exactly true

  • truly:function
    • Checks if a value is truthy (converts to true in boolean context).

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns boolean

      True if the value is truthy

  • undefined:function
    • Checks if a value is undefined.

      Parameters

      • val: unknown

        The value to check

      • Rest...args: unknown[]

        Additional arguments (unused)

      Returns val is undefined

      True if the value is undefined