You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
375 B
17 lines
375 B
/* eslint eqeqeq: 0 */
|
|
|
|
function equal(old, target) {
|
|
let r = true;
|
|
for (const prop in old) {
|
|
if (typeof old[prop] === 'function' && typeof target[prop] === 'function') {
|
|
if (old[prop].toString() != target[prop].toString()) {
|
|
r = false;
|
|
}
|
|
} else if (old[prop] != target[prop]) {
|
|
r = false;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
|
|
export default equal;
|
|
|