Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var deepEqual = function (x, y) {
- if ((typeof x == "object" && x != null) && (typeof y == "object" && y != null)) {
- if (Object.keys(x).length != Object.keys(y).length) {
- return false;
- }
- for (var prop in x) {
- if (y.hasOwnProperty(prop)) {
- return deepEqual(x[prop], y[prop]);
- }
- }
- } else if (x !== y) {
- return false;
- } else {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement