当前位置:网站首页>Mongoose - Why we make “mongoose.Promise = global.Promise” when setting a mongoose module?
Mongoose - Why we make “mongoose.Promise = global.Promise” when setting a mongoose module?
2022-06-26 02:24:00 【Bustling city 】
problem :
I'm working with Mongoose. I am working with meerkats .I have seen a lot of developers make the following command: I've seen many developers issue the following commands :
mongoose.Promise = global.Promise;Then I was curious to see what is the original value of mongoose.Promise . Then I looked at it curiously mongoose.Promise What is the original value of .I have entered in my editor the following command: I entered the following command in the editor :
const mongoose = require("mongoose");console.log("promise: ", mongoose.Promise);My console returned me : My console returns to me :
promise: function Promise() { [native code] } promise : function Promise() { [ Native code ] }
Okay, so why make the command mongoose.Promise = global.Promise since the Mongoose's promise already returns a native code ? well , So why use commands mongoose.Promise = global.Promise because Mongoose Of mongoose.Promise = global.Promise Native code has been returned ?I don't understand the point, if someone can help us to understand, would be great, I don't understand that , If someone can help us understand , That would be great ,
Thanks thank you
Solution :
Reference resources : https://stackoom.com/en/question/3Vbp4边栏推荐
- 连接投影仪
- Scala Basics (II): variables and data types
- cv==biaoding---open----cv001
- 官方零基础入门 Jetpack Compose 的中文课程来啦!
- Digital commodity DGE -- the dark horse of wealth in digital economy
- ARM流水线如何提高代码执行效率
- vscode调试时提示更新到最新调试版本
- Connecting the projector
- In depth good article: what is supernetting?
- Chrome browser developer tool usage
猜你喜欢
随机推荐
[image filtering] image filtering system based on Matlab GUI [including Matlab source code 1913]
Redis6.0新特性——ACL(权限控制列表)实现限制用户可执行命令和KEY
Meaning of each state in TCP network communication
Shell learning record (I)
初识Opengl
. Net7 miniapi (special part):preview5 optimizes JWT verification (Part 2)
How to use commands to write file names (including paths) in folders to txt files
图的深度优先遍历
【图像过滤】基于matlab GUI图像过滤系统【含Matlab源码 1913期】
Calibration...
【js】免费api判断节假日、工作日和周六日
One minute to understand the difference between synchronous, asynchronous, blocking and non blocking
Consumer of microservices
V4l2+qt video optimization strategy
Implementation of image binary morphological filtering based on FPGA -- Corrosion swelling
Binary search
Redis-SDS
将weishi相机图片进行转换
标定。。。
Graphics rendering pipeline









