Travis Horn
Travis Horn

Travis Horn

Just for fun: The LOL ID

Just for fun: The LOL ID

Travis Horn's photo
Travis Horn

Published on Feb 14, 2019

1 min read

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.

  .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


Don’t actually use this code for anything, ever. The IDs are not guaranteed to be unique by a looong shot.

Share this