KimJinBoo / dddd

0 stars 0 forks source link

dddd #1

Open KimJinBoo opened 5 years ago

KimJinBoo commented 5 years ago
var newParr = []
  function ForF(min, max) {
    for (let i = min; i <= max; i++) {
      newParr.push(i)
    }
  }
  var newLarr = []
  function cNL(min, max) {
    for (let i = min; i <= max; i++) {
      newLarr.push(i)
    }
  }
ForF(622126,622925)
ForF(624,626)
ForF(6282,6288)
cNL(16,19)
  if (
    newParr.includes(cardNumber.slice(0, 6)) && newLarr.includes(cardNumber.length)) {
    return "China UnionPay"
  }
  else if (
    newParr.includes(cardNumber.slice(0, 3)) && newLarr.includes(cardNumber.length)) {
    return "China UnionPay"
  }
  else if (
    newParr.includes(cardNumber.slice(0, 4)) && newLarr.includes(cardNumber.length)) {
    return "China UnionPay"
  }
0strich commented 5 years ago
for (let prefix in MaestroArray) {
    for (let addStr = 8; addStr <= 15; addStr++) {
      let finalPrefix = MaestroArray[prefix]
      it('has a prefix of ' + MaestroArray[prefix] + ' and a length of ' + (addStr + 4), function () {
        expect(detectNetwork(finalPrefix + '0'.repeat(addStr))).to.equal("Maestro")
      })
    }
  }
0strich commented 5 years ago
for (let Larr in newLarr) {
    for (let Parr in newParr) {
      let addStr = newLarr[Larr] - newParr[Parr].toString().length

      it('has a prefix of ' + newParr[Parr] + ' and a legnth of ' + newLarr[Larr], function () {
        expect(detectNetwork(newParr[Parr] + '0'.repeat(addStr))).to.equal('China UnionPay')
      })
    }
  }