'use strict';var_typeof=typeofSymbol==="function"&&typeofSymbol.iterator==="symbol"?function(obj){returntypeofobj}:function(obj){returnobj&&typeofSymbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeofobj};varisEq=functionisEq(item1,item2,compareKeys){if((typeofitem1==='undefined'?'undefined':_typeof(item1))!==(typeofitem2==='undefined'?'undefined':_typeof(item2))){returnfalse}if(Array.isArray(item1)){if(!Array.isArray(item2)){returnfalse}}if(Array.isArray(item2)){if(!Array.isArray(item1)){returnfalse}}if(typeofitem1==='number'||typeofitem1==='string'||typeofitem1==='boolean'||item1===null||item1===undefined){if(item1===item2){returntrue}else{returnfalse}};if(item1===NaN&&item2===NaN){returntrue}if(item1instanceofRegExp){returnString(item1)===String(item2)}if((typeofitem1==='undefined'?'undefined':_typeof(item1))!=='object'||(typeofitem2==='undefined'?'undefined':_typeof(item2))!=='object'){thrownewError('[isEq] Unhandleable input!')}varitem1Keys=Object.keys(item1);varitem2Keys=Object.keys(item2);if(!compareKeys){compareKeys=item1Keys;if(item1Keys.length!==item2Keys.length){returnfalse}};if(!Array.isArray(compareKeys)){thrownewError('[isEq] third parameter should be an array of keys!')}if(compareKeys.length===0){returntrue}for(varKeyIndexincompareKeys){varKey=compareKeys[KeyIndex];if(Array.isArray(item1[Key])&&Array.isArray(item2[Key])){var_Key=KeyIndex};if(item1[Key]!==item2[Key]){if(_typeof(item1[Key]==='object')&&_typeof(item2[Key]==='object')||Array.isArray(item1[Key])&&Array.isArray(item2[Key])){if(!isEq(item1[Key],item2[Key])){returnfalse;break}}else{returnfalse;break}}};returntrue};module.exports=isEq;