UNPKG

@fidaktk/ids

Version:

A lightweight, dependency-efficient ID generator package for Node.js and web projects. Supports BSON `ObjectId` (compatible with MongoDB/Mongoose), UUIDv4/v5, CUID2, and URL-safe slug IDs.

5 lines (4 loc) 186 B
import slugid from 'slugid'; import { createId } from '@paralleldrive/cuid2'; export const cuidId = () => createId(); // secure, 24-character ID export const slug = () => slugid.nice();