MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / objEquiv

Function objEquiv

ServerEditorWeb/ace/worker-html.js:9791–9823  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

9789}
9790
9791function objEquiv(a, b) {
9792 if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
9793 return false;
9794 if (a.prototype !== b.prototype) return false;
9795 if (isArguments(a)) {
9796 if (!isArguments(b)) {
9797 return false;
9798 }
9799 a = pSlice.call(a);
9800 b = pSlice.call(b);
9801 return _deepEqual(a, b);
9802 }
9803 try {
9804 var ka = objectKeys(a),
9805 kb = objectKeys(b),
9806 key, i;
9807 } catch (e) {//happens when one is a string literal and the other isn't
9808 return false;
9809 }
9810 if (ka.length != kb.length)
9811 return false;
9812 ka.sort();
9813 kb.sort();
9814 for (i = ka.length - 1; i >= 0; i--) {
9815 if (ka[i] != kb[i])
9816 return false;
9817 }
9818 for (i = ka.length - 1; i >= 0; i--) {
9819 key = ka[i];
9820 if (!_deepEqual(a[key], b[key])) return false;
9821 }
9822 return true;
9823}
9824
9825assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
9826 if (_deepEqual(actual, expected)) {

Callers 1

_deepEqualFunction · 0.85

Calls 2

isArgumentsFunction · 0.85
_deepEqualFunction · 0.85

Tested by

no test coverage detected