deep-trails - v3.0.0-beta.3
    Preparing search index...

    Function typeOf

    • Detects the exact type of a value very quickly.

      If it is an object, Object.prototype.toString is used.

      Parameters

      • value: unknown

        Some value.

      • useCache: boolean = typeOf.useCache

        If it's truthy and value is an object, returns the previous cache result.

      Returns string

      The string tag if value is an object; otherwise, "null" or typeof value.

      typeOf(null)          // "null"
      typeOf(Map) // "Function"
      typeOf({}) // "Object"
      typeOf([]) // "Array"
      typeOf(Number()) // "number"
      typeOf(new Number()) // "Number"

      3.0.0-beta.0

    Index

    Properties

    Properties

    useCache: boolean

    Default value for the second parameter of typeOf.