如何判断js运行在浏览器中还是node中?

判断有无全局对象global和window

posted @ 2020-12-17 07:25  咔啡  阅读(663)  评论(0编辑  收藏  举报