A JavaScript object for restricted randomisation