Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function buildScanOptions (argv) {
const options = {
percent: argv.percent,
concurrent: argv.concurrent
}
let priority
switch ((argv.priority || '').toUpperCase()) {
case 'LOW':
priority = Aerospike.scanPriority.LOW
break
case 'MEDIUM':
priority = Aerospike.scanPriority.MEDIUM
break
case 'HIGH':
priority = Aerospike.scanPriority.HIGH
break
case 'auto':
priority = Aerospike.scanPriority.AUTO
break
}
if (priority) {
options.priority = priority
}
console.info(options)