JSFiddle - React, Tailwind, and code Playground

JavaScript

var x = {"setInterval" : "foo" };

newIsWindow =  function( obj ) {
        return obj && typeof obj === "object"  && obj.window === window; 
};

console.log("jQuery.isWindow; should be false",jQuery.isWindow(x)) ; //should be false, is true;
console.log("newIsWindow; should be false",newIsWindow(x)) ; //false
console.log("proposed change, still true:",newIsWindow(window)); //true
console.log("proposed change, still true:",newIsWindow(window.window)); //true