腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
CoffeeScript
对象
语法:
exports
.index与
exports
= {}
coffeescript
、
express
我发现 res.render "index",编译为
exports
= res.render "index",这样我就不必为所有路由都键入
ex
浏览 0
提问于2012-06-23
得票数 1
回答已采纳
2
回答
同时使用module.
exports
和导出时出错
node.js
、
commonjs
module.
exports
和
exports
不是引用同一个
对象
吗? sum : function(a,b){ }
e
浏览 3
提问于2017-07-09
得票数 0
1
回答
带
对象
的module.
exports
javascript
、
node.js
、
module
、
routes
、
export
我想,也许我和module.
exports
的事搞混了。我很确定这是个菜鸟问题。我试着做一个简单的任务: module.
exports
= function() { tryLogin :function(Username,Password){ };oAuth -调度员route.js app.post('/api/oAuthtryLogin :f
浏览 5
提问于2014-07-07
得票数 0
回答已采纳
2
回答
使用module.
exports
返回
对象
javascript
、
node.js
var jsonText = JSON.stringify(jsonArray);但是,不幸的是,portfolio
对象
是未定义的。谢谢
浏览 3
提问于2016-05-08
得票数 1
回答已采纳
4
回答
为什么我们在nodejs中使用出口?
node.js
据我所知,module.
exports
和
exports
都是空
对象
。module.
exports
可以公开函数,而
exports
不能公开函数。一切都可以通过module.
exports
实现。那么,即使我们有
exports
,为什么还要使用module.
exports
呢?
exports
相对于module.
exports
的优点是什么?
浏览 2
提问于2016-12-22
得票数 7
回答已采纳
4
回答
module.export和导出的区别是什么?
node.js
如果module.export
对象
中有一些属性呢?那么export.xx会无效吗?
浏览 6
提问于2017-04-13
得票数 2
回答已采纳
2
回答
module.
exports
返回空
对象
node.js
、
require
useUnifiedTopology: true,); module.
exports
= result; mongo.c
浏览 6
提问于2020-08-01
得票数 0
2
回答
这将在节点中运行js文件时返回空
对象
。
javascript
、
node.js
当我尝试重新分配module.
exports
时,this仍然指向一个空
对象
console.log(this) // {}console.log(this) // {a:4} 为什么我在这两种情况下都得不到相同的结果?
浏览 2
提问于2020-06-06
得票数 1
回答已采纳
2
回答
当module.
exports
被分配一个
对象
时,为什么这是一个空
对象
?
javascript
、
node.js
、
this
当通过module.
exports
定义模块时,this的值应该改变。然而,根据我分配给module.
exports
的内容,结果是不同的,这是我不理解的。this引用了一个包含这个字符串的
对象
:// > {nameOfModule: 'This Tutorial Module' } 2-在第二个示例中,为modu
浏览 0
提问于2019-07-14
得票数 2
1
回答
module.export与js和typescript中的导出处理程序
javascript
、
node.js
、
typescript
、
amazon-web-services
typescript中的这个导出函数有什么区别 eventHandler({ lambdaHandler) module.export ={ eventHandler({ ...someMiddle
浏览 1
提问于2021-01-08
得票数 1
23
回答
module.
exports
与Node.js中的导出
javascript
、
node.js
、
commonjs
我在一个Node.js模块中找到了以下约定: module.
exports
=
exports
= nano = function database_module(cfg) {...}我想知道module.
exports
和
exports
之间有什么不同,为什么要在这里同时使用它们。
浏览 21
提问于2011-08-21
得票数 804
回答已采纳
2
回答
为什么console.log有时会为已导出的变量打印未定义的内容?
javascript
、
node.js
、
import
例如:var peaches = 'Peaches';
exports
.peaches = 'Peaches
浏览 3
提问于2016-08-24
得票数 2
回答已采纳
1
回答
如何将子代函数绑定到顶层父
对象
?
javascript
、
node.js
、
bind
如果我不使用.bind(),它将引用.next (其父
对象
),而不是顶级
对象
。有没有办法让this总是引用顶级
对象
exports
site: site, next: function($){console.log('Site: ', this.site); return this.site + $('.foo').attr('href')
浏览 0
提问于2014-05-25
得票数 1
2
回答
这个剧本是怎么回事?
javascript
、
properties
、
scope
、
scoping
我有一个变量ctx,它有两个属性ctx.
exports
和ctx.module.
exports
。正如您在下面看到的int eh代码所示,我已经建立了关系ctx.module.
exports
= ctx.
exports
,因此当ctx.
exports
被修改时,ctx.module.
exports
保持相同的值var ctx = {};ctx.module = {
exports
: ctx.
exports</em
浏览 3
提问于2017-01-19
得票数 0
回答已采纳
1
回答
使用module.
exports
=新示例导出
对象
与使用module.
exports
= Sample
javascript
、
node.js
假设一个文件有很多原型和函数
对象
声明代码: ... ...module.
exports
= new Sample; 我对此有几个问题: 什么信号的项目设计将让我决定使用一个或另一个?你能提供一个关于什么时候使用module.<em
浏览 2
提问于2018-05-08
得票数 2
1
回答
执行多个导出时,“错误: Route.get()需要回调函数,但得到[object Undefined]”
javascript
、
node.js
、
express
、
export
、
middleware
以下是代码isLoggedIn = (req, res, next) => {} };const isLoggedIn = require('.auth').isLoggedIn;getAllProfile = (req, res) => {}
浏览 55
提问于2019-11-17
得票数 0
回答已采纳
1
回答
给module.
exports
赋值
javascript
、
node.js
、
commonjs
我正在读关于module.
exports
in 的文章。这本书中提到:
exports
= function() { }; 我不明白为什么上面的作业是错的?
浏览 2
提问于2016-06-17
得票数 0
回答已采纳
2
回答
为什么导出= module.
exports
= {};?为什么不只是module.
exports
呢?
node.js
、
express
我的module.
exports
= foo返回一个空
对象
{}。有人能解释这个吗? 只有当我使用
exports
= module.
exports
= foo时,我的
对象
才不是空的。
浏览 1
提问于2014-10-25
得票数 1
8
回答
CommonJs模块系统中"module.
exports
“和"
exports
”的区别
javascript
、
node.js
、
commonjs
在此页面()上,它声明“如果要将
exports
对象
设置为函数或新
对象
,则必须使用module.
exports
对象
。”module.
exports
= function () {}
exports
= function ()
浏览 4
提问于2013-05-05
得票数 314
回答已采纳
1
回答
在CoffeeScript不导入外部文件的情况下,Casper要求()
coffeescript
、
require
、
casperjs
patchRequire global.require my_page = "foo"
exports
浏览 0
提问于2015-04-23
得票数 1
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
面向对象-类和对象
小程序模拟建立数据库
可变对象与不可变对象
前端模块化CMD规范seajs的使用
没有对象怎么面向对象编程呢?
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券