Skip to content

Has CUID output changed in v3? #111

@Jimmy89

Description

@Jimmy89

Within my project I generated multiple cuid's through createId and within this time frame I created multiple unit tests with these examples.

I noticed that, after upgrading to v3 of this lib, my unit tests started to fail.

I found that the problem is that isCuid no requires the first character to be a-z, while previously this first character could also be a number.
Commit: 587a887

My question: has the cuid creation algorithm also changed in that first the first letter could be a number and currently not anymore, or is my test faulty and I should never have tested with the first character being a number? (because that could never have been the output).

Thank you in advance for the answer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions