Home

function: isSymbol


isSymbol(value: *): boolean

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

Example(s):

isSymbol(Symbol.iterator)
// => true

isSymbol('abc')
// => false

Params:

Name Type Attribute Description
value The value to check.

Returns:

boolean

  {
    "comment": "/**\r\n * Checks if `value` is classified as a `Symbol` primitive or object.\r\n *\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\r\n * @example\r\n *\r\n * isSymbol(Symbol.iterator)\r\n * // => true\r\n *\r\n * isSymbol('abc')\r\n * // => false\r\n */",
    "meta": {
        "range": [
            386,
            548
        ],
        "filename": "isSymbol.js",
        "lineno": 18,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100005302",
            "name": "isSymbol",
            "type": "FunctionDeclaration",
            "paramnames": [
                "value"
            ]
        },
        "vars": {
            "type": "isSymbol~type"
        }
    },
    "description": "Checks if `value` is classified as a `Symbol` primitive or object.",
    "since": "4.0.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Lang",
            "value": "Lang"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "*"
                ]
            },
            "description": "The value to check.",
            "name": "value"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "boolean"
                ]
            },
            "description": "Returns `true` if `value` is a symbol, else `false`."
        }
    ],
    "examples": [
        "isSymbol(Symbol.iterator)\r// => true\r\risSymbol('abc')\r// => false"
    ],
    "name": "isSymbol",
    "longname": "isSymbol",
    "kind": "function",
    "scope": "global",
    "___id": "T000002R000501",
    "___s": true,
    "filepath": "isSymbol.js"
}