JavaScript minimum utility