General purpose Javascript utilities.