Initial commit
This commit is contained in:
12
node_modules/mongoose/lib/helpers/topology/isAtlas.js
generated
vendored
Normal file
12
node_modules/mongoose/lib/helpers/topology/isAtlas.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function isAtlas(topologyDescription) {
|
||||
if (topologyDescription == null ||
|
||||
topologyDescription.constructor.name !== 'TopologyDescription') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const hostnames = Array.from(topologyDescription.servers.keys());
|
||||
return hostnames.length > 0 &&
|
||||
hostnames.every(host => host.endsWith('.mongodb.net:27017'));
|
||||
};
|
||||
Reference in New Issue
Block a user