@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.
9 lines (8 loc) • 309 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.uuidv5 = exports.uuidv4 = void 0;
const uuid_1 = require("uuid");
const uuidv4 = () => (0, uuid_1.v4)();
exports.uuidv4 = uuidv4;
const uuidv5 = (name, namespace) => (0, uuid_1.v5)(name, namespace);
exports.uuidv5 = uuidv5;