I want to generate unique
uid for objects which will be stored in database.
I am using UUID npm package to generate unique id.
I want to know is there a chance that any of the id's generated by this package can repeat themselves? like the following answer https://stackoverflow.com/a/38944736/13126651 speaks about nano id package and how it doesnt generate duplicates, is there same conviction for uuid package too?
ofcourse there can be solution to check database before storing but since this will I/o operation i want to avoid this and since this will be in REST API so i cant even maintain state.
Note :- i am specualting that my API will hit around 1000 times in a day so is there chance of repeating uid's?
Update :- How unique is UUID? this question talks about how UUID are unique but if someone can explain does UUID npm package does something extra to ensure it never repeats?