code: function mod9710 (input) {
    var m = 0
    for (var i = 0; i < input.length; i++) {
      m *= 10
      m += input.charCodeAt(i) - 48 // parseInt()
      m %= 97
    }
    return m
  }
docs: Calculate ISO7064 mod 97-10 NOTE: assumes all numeric input string