随笔分类 -  nodeJs相关

摘要:1.首先,nodeJs中没有window对象,但是有全局变量global 模块打印global对象: <ref *1> Object [global] { global: [Circular *1], clearInterval: [Function: clearInterval], clearTi 阅读全文
posted @ 2021-07-29 22:42 前端李淳罡 阅读(410) 评论(0) 推荐(0)
摘要:结论:没区别。 在nodeJs中,exports指向module.exports,是module.exports的引用,二者等同,但当使用 exports = x 的时候,造成了exports不再指向module.exports,所以,仅改变了exports,并没有改变module.exports, 阅读全文
posted @ 2021-07-29 22:07 前端李淳罡 阅读(149) 评论(0) 推荐(0)