Javascript data structure utilities.