-
Couldn't load subscription status.
- Fork 12
Description
I've just found out that the generation of UUIDs without a namespace are not standard, all other implementations found online and in other programming languages requires providing a namespace and a name.
The specification explicitly says to use a namespace during generation:
"o Compute the hash of the name space ID concatenated with the name."
Currently your library concatenates an empty array that results in using just the data of the provided name for hashing without any data of the namespace: https://github.com/danakt/uuid-by-string/blob/master/src/index.js#L35
Should you specify in the documentation about library's non-standard function?
Another solution would be using a nil UUID as namespace in cases when user provides no namespace (but that will break current tests that check the generation of UUID without a namespace).