@pengzhanbo/utils - v3.7.3
    Preparing search index...

    Function typeOf

    • Get the type of a value.

      获取值的类型。

      Parameters

      • s: unknown

        The value to get the type of. 要获取类型的值

      Returns string

      The type of the value as a string. 值的类型字符串

      typeOf(null) // => 'null'
      typeOf([]) // => 'array'
      typeOf(new Map()) // => 'map'
      typeOf(new Date()) // => 'date'
      typeOf(42) // => 'number'
      typeOf('hello') // => 'string'
      typeOf(() => {}) // => 'function'