arktype icon indicating copy to clipboard operation
arktype copied to clipboard

Add uuid4 type to default namespace

Open TizzySaurus opened this issue 1 year ago • 0 comments

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.

TizzySaurus avatar May 07 '23 03:05 TizzySaurus