标签:key amp script col ret turn class color obj
function looksLike(a, b) { return ( a && b && Object.keys(b).every(bKey => { const bVal = b[bKey] const aVal = a[bKey] if (typeof bVal === ‘function‘) { return bVal(aVal) } return isPrimitive(bVal) ? bVal === aVal : looksLike(aVal, bVal) }) ) } function isPrimitive(val) { return val == null || /^[sbn]/.test(typeof val) }
[Javascript] Deep partial equal Object LooksLike
标签:key amp script col ret turn class color obj
原文地址:https://www.cnblogs.com/Answer1215/p/12231334.html