A Javascript object for restricted randomisation