@jagaad/utils
    Preparing search index...

    Function isType

    • Utility functions for type checking in JavaScript. These functions help determine the type of a value at runtime.

      isType('hello', 'string'); // true
      isType(42, 'number'); // true
      isType(true, 'boolean'); // true
      isType([], 'array'); // true
      isType({}, 'object'); // true
      isType(null, 'null'); // true
      isType(undefined, 'undefined');

      Type Parameters

      Parameters

      • value: unknown
      • type: T

      Returns value is TypeMap[T]