_.isSymbol(value)

sourcenpm package

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

Since

4.0.0

Arguments

  • value (*): The value to check.

Returns

(boolean): Returns true if value is a symbol, else false.

Example

  1. _.isSymbol(Symbol.iterator);
    // => true
    _.isSymbol('abc');
    // => false