Jak wiedzieć, czy okno istnieje w NodeJS
if(typeof window !== 'undefined') {
console.log("this should print only if window object actually exists")
}
Gleaming Grasshopper