bin/deepstream-start.js
function parseBoolean (name, enabled) {
  let isEnabled
  if (typeof enabled === 'undefined' || enabled === 'true') {
    isEnabled = true
  } else if (typeof enabled !== 'undefined' && enabled === 'false') {
    isEnabled = false
  } else {
    console.error(`Invalid argument for ${name}, please provide true or false`)
    process.exit(1)
  }
  return isEnabled
}
function parseBoolean (name, enabled) {
  let isEnabled
  if (typeof enabled === 'undefined' || enabled === 'true') {
    isEnabled = true
  } else if (typeof enabled !== 'undefined' && enabled === 'false') {
    isEnabled = false
  } else {
    console.error(`Invalid argument for ${name}, please provide true or false`)
    process.exit(1)
  }
  return isEnabled
}
function parseBoolean ( name , enabled ) { let isEnabled if ( typeof enabled === 'undefined' || enabled === 'true' ) { isEnabled = true } else if ( typeof enabled !== 'undefined' && enabled === 'false' ) { isEnabled = false } else { console . error ( ` ${ name } ` ) process . exit ( 1 ) } return isEnabled }
Used by commander to parse boolean and fails if invalid
value is passed in
@private
Used by commander to parse boolean and fails if invalid value is passed in