-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
1 lines (1 loc) · 1.35 KB
/
index.js
1
Object.defineProperty(exports,"__esModule",{value:!0}),exports.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,t=Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:Object.keys;return function(n,a){return function n(a,c,u){var i,s,l,o=e.call(a),f=e.call(c);if(a===c)return!0;if(null==a||null==c)return!1;if(u.indexOf(a)>-1&&u.indexOf(c)>-1)return!0;if(u.push(a,c),o!=f)return!1;if(i=t(a),s=t(c),i.length!=s.length||i.some(function(e){return!n(a[e],c[e],u)}))return!1;switch(o.slice(8,-1)){case"Symbol":return a.valueOf()==c.valueOf();case"Date":case"Number":return+a==+c||+a!=+a&&+c!=+c;case"RegExp":case"Function":case"String":case"Boolean":return""+a==""+c;case"Set":case"Map":i=a.entries(),s=c.entries();do{if(!n((l=i.next()).value,s.next().value,u))return!1}while(!l.done);return!0;case"ArrayBuffer":a=new Uint8Array(a),c=new Uint8Array(c);case"DataView":a=new Uint8Array(a.buffer),c=new Uint8Array(c.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(a.length!=c.length)return!1;for(l=0;l<a.length;l++)if((l in a||l in c)&&(l in a!=l in c||!n(a[l],c[l],u)))return!1;return!0;case"Object":return n(r(a),r(c),u);default:return!1}}(n,a,[])}}();