Any one know how the 25 character ID's are generat...
# prisma-whats-new
d
Any one know how the 25 character ID's are generated? I think I'm looking for
Cuid.createCuid
a
d
Thanks Also found a JS impl. https://github.com/ericelliott/cuid
a
Yeah, just beware that the format is not 100% the same
d
Also, for fun, both implementations will change length after 2059-05-25T173827.455Z when the stamp will increase length by one in base 36!
😂 1
Copy code
> new Date(parseInt('zzzzzzzz',36))
2059-05-25T17:38:27.455Z
😄 1
n
just beware that the format is not 100% the same
how so?
a
See the regex example. The place of the digits is different.
cuid uses c-w8-d4-w4-w8, your cuid uses c-w12-d4-w4-w4
Actually, the ID's are not in line with the description in the README of graphcool/cuid-java...