code: function makeAsciiTable(spec) {
    var ret = new Uint8Array(128);
    spec.forEach(function(item){
      if (typeof item === "number") {
        ret[item] = 1;
      }
      else {
        var start = item[0];
        var end = item[1];
        for (var j = start; j <= end; ++j) {
          ret[j] = 1;
        }
      }
    });
  
    return ret;
  }
docs: Create a table with the characters 0x30-0x39 (decimals '0' - '9') and 0x7A (lowercaseletter 'z') as `true`:  var a = makeAsciiTable([[0x30, 0x39], 0x7A]); a[0x30]; //1 a[0x15]; //0 a[0x35]; //1