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.
我想在 Spooky.js 中使用节点全局变量。所以我如何将全局变量访问到 SpookyJS。请帮我解决这个问题?
使用.bind()功能。例子:
var globalVar = "foo"; var spooky = new Spooky({...}, function (err) { ... }.bind({globalVar: globalVar}));