+ 2
What is the best way to detect Node.JS/browser environment?
I know these: BROWSER: (typeof window !== "undefined") BACKEND/NODE: (typeof module.?exports !== "undefined") && (typeof process !== "undefined") Are valid? https://code.sololearn.com/cxVqYZ7L9su9/
1 Answer
0
I attach my script