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