{"ScriptPreparationCode":"// 1 level deep\r\nwindow.foo1 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\nwindow.bar1 = { a: 1, b: 3, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\n\r\n// 2 levels deep\r\nwindow.foo2 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\nwindow.bar2 = { a: 1, b: 2, c: { a: 1, b: 3, c: { a: 1, b: 2 } } };\r\n\r\n// 3 levels deep\r\nwindow.foo3 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\nwindow.bar3 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 4 } } };\r\n\r\n// real world\r\nwindow.foo4 = {\r\n info: {\r\n clientId: 0,\r\n businessName: \u0027Aaron Air LLC\u0027,\r\n uniqueLocationReference: \u0027112\u0027,\r\n country: \u0027AUS\u0027,\r\n address1: \u00271957 Pioneer Rd.\u0027,\r\n address2: \u0027Unit E3\u0027,\r\n city: \u0027Aranda\u0027,\r\n state: \u0027Australian Capital Territory\u0027,\r\n postcode: \u002719006\u0027,\r\n businessTelephone: \u0027(267) 872-0809\u0027,\r\n url: \u0027http://www.aaronairhvac.com\u0027,\r\n googlePlaceId: 0,\r\n coords: {\r\n lat: 0,\r\n lng: 0\r\n },\r\n formationDate: null,\r\n gmbListing: {\r\n googlePlaceData: null,\r\n externalGooglePlaceId: null\r\n },\r\n primaryCategory: 509\r\n },\r\n about: \u0027About the Business\u0027,\r\n openingHours: {\r\n regular: {\r\n applyToAll: false,\r\n notSupplied: false,\r\n mon: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n tue: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n wed: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n thu: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n fri: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n sat: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n sun: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n }\r\n },\r\n special: []\r\n },\r\n cb: {\r\n contactFirstName: \u0027Steve\u0027,\r\n contactLastName: \u0027Borell\u0027,\r\n contactEmail: \u0027steve@aaronair.net\u0027,\r\n contactMobileTelephone: \u0027(267) 872-0809\u0027,\r\n contactFax: \u0027\u0027,\r\n employeesNumber: null,\r\n paymentMethods: [],\r\n services: [\r\n null\r\n ],\r\n socialProfileLinks: null,\r\n additionalCategories: []\r\n },\r\n photos: {\r\n cb: {\r\n logoUrl: \u0027\u0027,\r\n photo1Url: \u0027\u0027,\r\n photo2Url: \u0027\u0027,\r\n photo3Url: \u0027\u0027\r\n }\r\n },\r\n additionalData: {\r\n gmb: {\r\n attributes: [],\r\n labels: [\r\n \u0027\u0027\r\n ],\r\n gmbStoreCode: \u0027\u0027,\r\n alternativePhones: [\r\n {\r\n countryCode: \u0027\u0027,\r\n number: \u0027\u0027\r\n }\r\n ],\r\n adsPhone: [\r\n {\r\n countryCode: \u0027\u0027,\r\n number: \u0027\u0027\r\n }\r\n ],\r\n additionalCategories: [],\r\n media: []\r\n },\r\n facebook: {\r\n additionalCategories: [],\r\n priceRange: \u0027\u0027,\r\n description: \u0027\u0027\r\n },\r\n bing: {\r\n additionalCategories: [],\r\n description: \u0027\u0027\r\n },\r\n metadata: {\r\n activeSync: {\r\n gmb: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n facebook: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n yelp: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n bing: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n appleMaps: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n }\r\n }\r\n }\r\n },\r\n notifications: {\r\n alerts: [],\r\n sources: [\r\n \u0027gmb\u0027,\r\n \u0027facebook\u0027,\r\n \u0027bing\u0027\r\n ],\r\n selectedSources: [],\r\n paging: null,\r\n newAlertsCount: 0\r\n }\r\n };\r\n\r\nwindow.bar4 = {\r\n info: {\r\n clientId: 0,\r\n businessName: \u0027Aaron Air LLC\u0027,\r\n uniqueLocationReference: \u0027112\u0027,\r\n country: \u0027AUS\u0027,\r\n address1: \u00271957 Pioneer Rd.\u0027,\r\n address2: \u0027Unit E3\u0027,\r\n city: \u0027Aranda\u0027,\r\n state: \u0027Australian Capital Territory\u0027,\r\n postcode: \u002719006\u0027,\r\n businessTelephone: \u0027(267) 872-0809\u0027,\r\n url: \u0027http://www.aaronairhvac.com\u0027,\r\n googlePlaceId: 0,\r\n coords: {\r\n lat: 0,\r\n lng: 0\r\n },\r\n formationDate: null,\r\n gmbListing: {\r\n googlePlaceData: null,\r\n externalGooglePlaceId: null\r\n },\r\n primaryCategory: 509\r\n },\r\n about: \u0027About the Business\u0027,\r\n openingHours: {\r\n regular: {\r\n applyToAll: false,\r\n notSupplied: false,\r\n mon: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n tue: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n wed: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n thu: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n fri: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n sat: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n },\r\n sun: {\r\n status: \u0027closed\u0027,\r\n hours: []\r\n }\r\n },\r\n special: []\r\n },\r\n cb: {\r\n contactFirstName: \u0027Steve\u0027,\r\n contactLastName: \u0027Borell\u0027,\r\n contactEmail: \u0027steve@aaronair.net\u0027,\r\n contactMobileTelephone: \u0027(267) 872-0809\u0027,\r\n contactFax: \u0027\u0027,\r\n employeesNumber: null,\r\n paymentMethods: [],\r\n services: [\r\n null\r\n ],\r\n socialProfileLinks: null,\r\n additionalCategories: []\r\n },\r\n photos: {\r\n cb: {\r\n logoUrl: \u0027\u0027,\r\n photo1Url: \u0027\u0027,\r\n photo2Url: \u0027\u0027,\r\n photo3Url: \u0027\u0027\r\n }\r\n },\r\n additionalData: {\r\n gmb: {\r\n attributes: [],\r\n labels: [\r\n \u0027\u0027\r\n ],\r\n gmbStoreCode: \u0027\u0027,\r\n alternativePhones: [\r\n {\r\n countryCode: \u0027\u0027,\r\n number: \u0027\u0027\r\n }\r\n ],\r\n adsPhone: [\r\n {\r\n countryCode: \u0027\u0027,\r\n number: \u0027\u0027\r\n }\r\n ],\r\n additionalCategories: [],\r\n media: []\r\n },\r\n facebook: {\r\n additionalCategories: [],\r\n priceRange: \u0027\u0027,\r\n description: \u0027\u0027\r\n },\r\n bing: {\r\n additionalCategories: [],\r\n description: \u0027\u0027\r\n },\r\n metadata: {\r\n activeSync: {\r\n gmb: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n facebook: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n yelp: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n bing: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n },\r\n appleMaps: {\r\n activeSyncEnabled: false,\r\n autoSuppressionEnabled: false,\r\n connectedItemId: null,\r\n syncStatus: \u0027\u0027\r\n }\r\n }\r\n }\r\n },\r\n notifications: {\r\n alerts: [],\r\n sources: [\r\n \u0027gmb\u0027,\r\n \u0027facebook\u0027,\r\n \u0027bing\u0027\r\n ],\r\n selectedSources: [],\r\n paging: null,\r\n newAlertsCount: 0\r\n }\r\n };\r\n\r\nfunction equals(v1, v2) {\r\n function countProps(obj) {\r\n let count = 0;\r\n for (const k in obj) {\r\n if (obj.hasOwnProperty(k)) {\r\n count\u002B\u002B;\r\n }\r\n }\r\n return count;\r\n }\r\n if (typeof v1 !== typeof v2) {\r\n return false;\r\n }\r\n if (typeof v1 === \u0027function\u0027) {\r\n return v1.toString() === v2.toString();\r\n }\r\n if (v1 instanceof Object \u0026\u0026 v2 instanceof Object) {\r\n if (countProps(v1) !== countProps(v2)) {\r\n return false;\r\n }\r\n for (const k in v1) {\r\n if (!equals(v1[k], v2[k])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } \r\n return v1 === v2;\r\n \r\n}","TestCases":[{"Name":"equals 4","Code":"equals(window.foo4, window.bar4)","IsDeferred":false},{"Name":"isEqual","Code":"_.isEqual(window.foo4, window.bar4)","IsDeferred":false}]}