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.
我有一个节点模块(IceJS),它坚持将其所有导出,而不是 in module.exports,而是 in global。有一种方法可以对模块进行沙箱处理并将global.ice其作为普通节点模块返回,如var ice = require("Ice");?
module.exports
global
global.ice
var ice = require("Ice");