Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: node.js 全局变量?
我如何在节点 js 中包含文件或脚本,我可以全局访问它。我想用一些功能扩展标准数组对象,但我不喜欢在 app.js 中这样做,而且我在模块中声明它,不可能全局访问它。
是否有可能使用其他命令来执行此操作?