Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to know if window exists in nodejs

if(typeof window !== 'undefined') {
  console.log("this should print only if window object actually exists")
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #window #exists #nodejs
ADD COMMENT
Topic
Name
6+7 =