当前位置:网站首页>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边栏推荐
- leetcode 300. Longest Increasing Subsequence 最长递增子序列 (中等)
- SDRAM controller -- implementation of arbitration module
- Shell learning record (I)
- OpenAPI 3.0 规范-食用指南
- Bloc入门之Cubit详解
- 深度好文:什么是超网 Supernetting?
- 工作一年闲记
- .NET7之MiniAPI(特别篇) :Preview5优化了JWT验证(下)
- What happens when the cloud answer does not display the third-party login button
- 其他代码,,vt,,,k
猜你喜欢

Implementation of image binary morphological filtering based on FPGA -- Corrosion swelling

【缺陷检测】基于matlab GUI印刷电路板自动缺陷检测【含Matlab源码 1912期】

Agent challenge - "Olympic running"

Ndk20b ffmpeg4.2.2 compilation and integration

Ardiuno智能电蚊拍

Depth first traversal based on adjacency table

Shell learning record (II)

Cross server SQL connection configuration

cv==biaoding---open----cv001

Blazor University (33) form - editcontext, fieldidentifiers
随机推荐
How to efficiently complete daily tasks?
MySQL doit maîtriser 4 langues!
Raspberry pie + AWS IOT introductory experiment
Back to top case
A solution to cross domain problems
哪个证券公司手机股票开户更好更安全?
Use of static library and dynamic library
In depth good article: what is supernetting?
Advanced cross platform application development (23): an article approaching the launch of testlight
socket demo01
ARM流水线如何提高代码执行效率
qtvtkvs2015测试代码
微服务之consul
Three factors affecting personal growth
vs2015+PCL1.8.1+qt5.12-----(1)
ROS2+DDS+RTPS
Sqlyog shortcut keys
It's better to finish one than start thousands of times (reprinted from Douban)
基于邻接矩阵的广度优先遍历
VTK initialization code learning 1