Currently, I use the "UUID package" (UUID 2.2.2) to generate a random UUID.
Uuid().v4().toString(); // -> 11c43ee8-b9d3-4e51-b73f-bd9dda66e29c