不知道应该在哪里把window换成global并且保持原先的模块可用。
模块已经测试可以正常使用的,就是像在runkit上测试测试不了,强迫症感觉很难受- -
求大神指点迷津~
学习是最好的投资!
The top of the browser's scope is the window object.
window
node environment scope is the global object.
global
Depending on whether you are running the code on node, try replacing window with global.
The top of the browser's scope is the
The top of thewindow
object.node environment scope is the
global
object.Depending on whether you are running the code on node, try replacing
window
withglobal
.