Js randomize lib.