diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 12:46:04 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 12:46:04 +0000 |
| commit | 7bee9b7e0968b650b3dbe2e35bf3a0d7d6e5e00e (patch) | |
| tree | 4e63af46a6e306bfeac1ef4b8bd83e1b45a37257 /node_modules/mongodb-core/lib/wireprotocol/shared.js | |
| parent | 6520aa92a114d65b17b178a952c8985e84afd231 (diff) | |
Removed some unused modules with prune
Diffstat (limited to 'node_modules/mongodb-core/lib/wireprotocol/shared.js')
| -rw-r--r-- | node_modules/mongodb-core/lib/wireprotocol/shared.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/node_modules/mongodb-core/lib/wireprotocol/shared.js b/node_modules/mongodb-core/lib/wireprotocol/shared.js deleted file mode 100644 index 3a20f51..0000000 --- a/node_modules/mongodb-core/lib/wireprotocol/shared.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict" - -var ReadPreference = require('../topologies/read_preference'); - -var getReadPreference = function(cmd, options) { - // Default to command version of the readPreference - var readPreference = cmd.readPreference || new ReadPreference('primary'); - // If we have an option readPreference override the command one - if(options.readPreference) { - readPreference = options.readPreference; - } - - if(typeof readPreference == 'string') { - readPreference = new ReadPreference(readPreference); - } - - if(!(readPreference instanceof ReadPreference)) { - throw new MongoError('readPreference must be a ReadPreference instance'); - } - - return readPreference; -} - -module.exports = { - getReadPreference: getReadPreference -} |
