js.doukaku[1] = '役判定'

http://ja.doukaku.org/comment/5186/
このほうがスマートだったか。

function doukaku121r(hand){
  var R = [], rd = {A:1, T:10, J:11, Q:12, K:13};
  var flush = /^(?:S+|H+|D+|C+)$/.test(hand.toUpperCase().replace(
    /[2-9TJQKA]/g, function(r){ ++R[r = rd[r] || r] || (R[r] = 1); return '' }));
  if(/1,1,1,1,1/.test(R +','+ R[1]))
    return flush ? (R[1] && R[13] ? 'Royal ' : '') +'Straight Flush' : 'Straight';
  switch((R = R.sort(function(x, y){ return y - x }))[0]){
   case 1: return flush     ? 'Flush'      : 'No Pair';
   case 2: return R[1] == 2 ? 'Two Pair'   : 'One Pair';
   case 3: return R[1] == 2 ? 'Full House' : 'Three of a Kind';
   case 4: return 'Four of a Kind';
  }
}