You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionextend(a,b){// Don't touch 'null' or 'undefined' objects.if(!a||!b){returna;}varkeys=Object.keys(b);for(vari=0,l=keys.length;i<l;i++){varkey=keys[i];// Detect object without array, date or null.if(Object.prototype.toString.call(b[key])==="[object Object]"){if(Object.prototype.toString.call(a[key])!=="[object Object]"){a[key]=b[key];}else{a[key]=extend(a[key],b[key]);}}else{a[key]=b[key];}}returna;};
The text was updated successfully, but these errors were encountered:
This isn't really an issue but I figured I'd let you know what I found on the js perf tests when using a
for
loop instead of aforEach
Here is the js perf tests http://jsperf.com/deep-extend-comparison
The text was updated successfully, but these errors were encountered: