Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return a template literal for uuid action #945

Open
sandros94 opened this issue Nov 29, 2024 · 4 comments
Open

feat: return a template literal for uuid action #945

sandros94 opened this issue Nov 29, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request next version Something to look at for our next major release

Comments

@sandros94
Copy link

This is just a small idea, feel free to close.

While working with node/web crypto I've noticed that randomUUID returns a template literal:

(alias) randomUUID(): `${string}-${string}-${string}-${string}-${string}`
import randomUUID
Available only in secure contexts.

Would it be possible to do the same for uuid action? Is it sufficient to change the TOutput of its BaseValidation?

> extends BaseValidation<TInput, TInput, UuidIssue<TInput>> {

@fabian-hiller
Copy link
Owner

Thanks for creating this issue. At the moment uuid is just a validation action and they don't transform output types. Nevertheless, your idea is great and I will take a close look at it in the next few weeks.

@fabian-hiller fabian-hiller self-assigned this Dec 4, 2024
@fabian-hiller fabian-hiller added enhancement New feature or request priority This has priority labels Dec 4, 2024
@sandros94
Copy link
Author

Thanks for creating this issue. At the moment uuid is just a validation action and they don't transform output types. Nevertheless, your idea is great and I will take a close look at it in the next few weeks.

Thanks, once you do tell me if I can help somehow

@fabian-hiller
Copy link
Owner

Feel free to join our discussion in #986, which is strongly related to this issue.

@fabian-hiller fabian-hiller added next version Something to look at for our next major release and removed priority This has priority labels Dec 27, 2024
@fabian-hiller
Copy link
Owner

As I wrote in PR #986, I plan to look at this again before releasing v2. If you would like such a feature (for other similar actions as well), please give this comment a thumbs up and share your use case with us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next version Something to look at for our next major release
Projects
None yet
Development

No branches or pull requests

2 participants