message: Extract operators into functions
diff: @@ -101,24 +101,10 @@ function feedbackChallenge () {
  }
  function knownVulnerableComponentChallenge () {
  - let knownVulnerableComponents = [
  - {
  - [Op.and]: [
  - {[Op.like]: '%sanitize-html%'},
  - {[Op.like]: '%1.4.2%'}
  - ]
  - },
  - {
  - [Op.and]: [
  - {[Op.like]: '%express-jwt%'},
  - {[Op.like]: '%0.1.3%'}
  - ]
  - }
  - ]
  models.Feedback.findAndCountAll({
  where: {
  comment: {
  - [Op.or]: knownVulnerableComponents
  + [Op.or]: knownVulnerableComponents()
  }
  }
  }).then(data => {
  @@ -129,7 +115,7 @@ function knownVulnerableComponentChallenge () {
  models.Complaint.findAndCountAll({
  where: {
  message: {
  - [Op.or]: knownVulnerableComponents
  + [Op.or]: knownVulnerableComponents()
  }
  }
  }).then(data => {
  @@ -139,18 +125,28 @@ function knownVulnerableComponentChallenge () {
  })
  }
  -function weirdCryptoChallenge () {
  - let weirdCryptos = [
  - {[Op.like]: '%z85%'},
  - {[Op.like]: '%base85%'},
  - {[Op.like]: '%hashids%'},
  - {[Op.like]: '%md5%'},
  - {[Op.like]: '%base64%'}
  +function knownVulnerableComponents () {
  + return [
  + {
  + [Op.and]: [
  + {[Op.like]: '%sanitize-html%'},
  + {[Op.like]: '%1.4.2%'}
  ]
  + },
  + {
  + [Op.and]: [
  + {[Op.like]: '%express-jwt%'},
  + {[Op.like]: '%0.1.3%'}
  + ]
  + }
  + ]
  +}
  +
  +function weirdCryptoChallenge () {
  models.Feedback.findAndCountAll({
  where: {
  comment: {
  - [Op.or]: weirdCryptos
  + [Op.or]: weirdCryptos()
  }
  }
  }).then(data => {
  @@ -161,7 +157,7 @@ function weirdCryptoChallenge () {
  models.Complaint.findAndCountAll({
  where: {
  message: {
  - [Op.or]: weirdCryptos
  + [Op.or]: weirdCryptos()
  }
  }
  }).then(data => {
  @@ -171,6 +167,16 @@ function weirdCryptoChallenge () {
  })
  }
  +function weirdCryptos () {
  + return [
  + {[Op.like]: '%z85%'},
  + {[Op.like]: '%base85%'},
  + {[Op.like]: '%hashids%'},
  + {[Op.like]: '%md5%'},
  + {[Op.like]: '%base64%'}
  + ]
  +}
  +
  function typosquattingNpmChallenge () {
  models.Feedback.findAndCountAll({where: {comment: {[Op.like]: '%epilogue-js%'}}}
  ).then(data => {
  