arktype
arktype copied to clipboard
Add uuid4 type to default namespace
Request a feature
The maintainers of ArkType will do our best to provide prompt feedback for any feature requests- especially those that are concise and persuasive!
🤷 Motivation
What problem are you having?
The current uuid
namespace item isn't specific enough for uuid4.
Why should we prioritize solving it?
uuid4
is the go-to use of uuid, used for most things uuid. As such, it'd be nice to add this.
💡 Solution
How do you think we should solve the problem?
Use the /[0-9a-f]{8}\-[0-9a-f]{4}\-4[0-9a-f]{3}\-[89ab][0-9a-f]{3}\-[0-9a-f]{12}/
regex.
Why do you think this is the best solution? It correctly addresses the spec of uuid4
Did you consider any alternatives? N/A. uuid4 is well-defined and there's only one "correct" regex.