-
Notifications
You must be signed in to change notification settings - Fork 114
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
Support for CUID and NanoId #419
Comments
I think string would be enough, no? class User {
cuid: string & PrimaryKey = cuid();
} |
I guess so, it wouldn't be able to validate the field though would it? The import { createId, isCuid } from '@paralleldrive/cuid2';
console.log(
isCuid(createId()), // true
isCuid('not a cuid'), // false
); |
True, no validation happens. When we add a new type like |
Could support for CUIDs and NanoIds be added?
Can be used in the same way as uuid:
This would be nice to have to shorten ids.
The text was updated successfully, but these errors were encountered: