Daddys little JS helper