small javascript library for the random method