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

    Function isPrimitive

    • Checks if the input is a primitive.

      检查输入是否为原始值。

      Parameters

      • v: unknown

        The value to check. 要检查的值

      Returns v is string | number | bigint | boolean | symbol | null | undefined

      True if the value is a primitive, false otherwise. 如果值为原始值则返回 true,否则返回 false

      isPrimitive(42) // => true
      isPrimitive({}) // => false