Function isSymbol

  • Checks if value is classified as a Symbol primitive or object.

    Parameters

    • value: any

      The value to check.

    Returns value is Symbol

    Returns true if value is a symbol, else false.

    5.5.0

    isSymbol(Symbol.iterator)
    // => true

    isSymbol('abc')
    // => false