// This test case is similar to object-keys-01, except that we replace // `Object.keys` by a copy of it.
let myThis = {
keys: Object.keys
};
// Similar functions are part of popular framework such as React and Angular. function shallowEqual(o1, o2) { var k1 = myThis.keys(o1); var k2 = myThis.keys(o2); if (k1.length != k2.length) { returnfalse;
} for (var k = 0; k < k1.length; k++) { if (!Object.hasOwnProperty.call(o2, k1[k]) || !Object.is(o1[k1[k]], o2[k1[k]])) { returnfalse;
}
} returntrue;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.