What type of unique identifier should you use for your next data-backed project? Incremental integers? UUIDs? A URL-friendly short ID? I present: the LOL ID.
'lxxxxxxxxl'
.replace(/x/g, () => Math.random() > 0.5 ? 'l' : 'o');
This code generates a random ID that starts and ends with “l” and contain eight random “o”s or “l”s.
Some random LOL IDs generated with this code:
lloollooll
lolollloll
lololloool
loolololll
loloooolol
Disclaimer
Don’t actually use this code for anything, ever. The IDs are not guaranteed to be unique by a looong shot.