Comment savoir si la fenêtre existe dans les nodejs

if(typeof window !== 'undefined') {
  console.log("this should print only if window object actually exists")
}
Gleaming Grasshopper