You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
397 B
JavaScript
24 lines
397 B
JavaScript
12 months ago
|
'use strict';
|
||
|
|
||
|
module.exports = function handleReadPreferenceAliases(pref) {
|
||
|
switch (pref) {
|
||
|
case 'p':
|
||
|
pref = 'primary';
|
||
|
break;
|
||
|
case 'pp':
|
||
|
pref = 'primaryPreferred';
|
||
|
break;
|
||
|
case 's':
|
||
|
pref = 'secondary';
|
||
|
break;
|
||
|
case 'sp':
|
||
|
pref = 'secondaryPreferred';
|
||
|
break;
|
||
|
case 'n':
|
||
|
pref = 'nearest';
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return pref;
|
||
|
};
|