menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Human-Read...
source image

Dev

3w

read

288

img
dot

Image Credit: Dev

Human-Readable IDs in PrismaJS with a few lines of code

  • Use prisma-prefixed-ids to automatically generate prefixed, human-readable IDs (like usr_abc123) in your Prisma models.
  • Install and use prisma-prefixed-ids with just one line of setup in your Prisma projects to improve ID clarity and structure.
  • The extension plugin uses nanoid for generating shorter, URL-safe, and high-entropy IDs, providing about 128-bit randomness.
  • You can also create a custom ID generator to customize the ID format and length using the prisma-prefixed-ids plugin.

Read Full Article

like

17 Likes

For uninterrupted reading, download the app