+ 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/
2 ответов
0
I attach my script