UUID is an Identifier system that can be generated locally and is almost impossible to duplicate.
Compared with other ID generation methods, UUID does not need to rely on other parts, and there are a variety of flexible generation methods.
@sudoo/uuid provides a variety of lightweight, standard-compliant UUID generation functions.
@sudoo/uuid has not extra dependencies. Use the following code in your project to install.
Use the package is also simple.
The following example shows how to create V1 uuid with @sudoo/uuid. V1 uuid generate by current timestamp, sequence, and random node number. Also, all uuid has technic to preset its uuid version number.
V4 uuid is generated entirely with random numbers. Use the following code to generate V4 uuid with @sudoo/uuid.