Performs a deep comparison between two values to determine if they are equivalent. **Note:** This method supports comparing arrays, array buffers, booleans, date objects, error objects, maps, numbers, `Object` objects, regexes, sets, strings, symbols, and typed arrays. `Object` objects are compared by their own, not inherited, enumerable properties. Functions and DOM nodes are compared by strict equality, i.e. `===`.
const object = { 'a': 1 }
const other = { 'a': 1 }
isEqual(object, other)
// => true
object === other
// => false
Name | Type | Attribute | Description |
---|---|---|---|
value | The value to compare. | ||
other | The other value to compare. |
{ "comment": "/**\r\n * Performs a deep comparison between two values to determine if they are\r\n * equivalent.\r\n *\r\n * **Note:** This method supports comparing arrays, array buffers, booleans,\r\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\r\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\r\n * by their own, not inherited, enumerable properties. Functions and DOM\r\n * nodes are compared by strict equality, i.e. `===`.\r\n *\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * const object = { 'a': 1 }\r\n * const other = { 'a': 1 }\r\n *\r\n * isEqual(object, other)\r\n * // => true\r\n *\r\n * object === other\r\n * // => false\r\n */", "meta": { "range": [ 896, 967 ], "filename": "eqDeep.js", "lineno": 29, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo", "code": { "id": "astnode100002195", "name": "isEqual", "type": "FunctionDeclaration", "paramnames": [ "value", "other" ] } }, "description": "Performs a deep comparison between two values to determine if they are\requivalent.\r\r**Note:** This method supports comparing arrays, array buffers, booleans,\rdate objects, error objects, maps, numbers, `Object` objects, regexes,\rsets, strings, symbols, and typed arrays. `Object` objects are compared\rby their own, not inherited, enumerable properties. Functions and DOM\rnodes are compared by strict equality, i.e. `===`.", "since": "0.1.0", "tags": [ { "originalTitle": "category", "title": "category", "text": "Lang", "value": "Lang" } ], "params": [ { "type": { "names": [ "*" ] }, "description": "The value to compare.", "name": "value" }, { "type": { "names": [ "*" ] }, "description": "The other value to compare.", "name": "other" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "Returns `true` if the values are equivalent, else `false`." } ], "examples": [ "const object = { 'a': 1 }\rconst other = { 'a': 1 }\r\risEqual(object, other)\r// => true\r\robject === other\r// => false" ], "name": "isEqual", "longname": "isEqual", "kind": "function", "scope": "global", "___id": "T000002R000238", "___s": true, "filepath": "eqDeep.js" }