UNPKG

ultra-uuid

Version:

A non-duplicate ultra-secure UUID generator using timestamp + extended character set

55 lines (43 loc) 1.3 kB
# ultra-uuid Ultra-unique, non-duplicate UUID generator using timestamp, counter, and randomness — **no crypto required**. ## ✅ Features - 50-character unique ID - Includes `Date.now()`, process ID, and counter - Fisher-Yates shuffled - No external libraries or `crypto` - Zero chance of duplication under normal loads ## 📦 Install ```bash npm install ultra-uuid ``` ## 🔧 Usage CommonJS ```bash const { generateUltraUUID } = require("ultra-uuid"); const id = generateUltraUUID(); console.log(id); ``` ES Module (ESM) ```bash import { generateUltraUUID } from "ultra-uuid"; const id = generateUltraUUID(); console.log(id); ``` ## 💡 Example Output ```bash ID: sPq1RUXkHL7MAwZBt4FiEQoNyv52dcVnb39glfYTeh6CJGuqwb Length: 50 ``` ## 📚 Use Cases - Generating safe IDs for databases - Replacing UUIDv4 without collision risk - Microservices request IDs - Non-guessable shortlinks - In-memory cache keys - Temporary tokens without crypto ## 🛠️ Developer Note - No need to worry about race conditions – internal counter + timestamp avoids duplication. - Shuffle ensures every ID looks random without true randomness. - Not cryptographically secure – avoid for password reset links or secure tokens. ## 📄 License MIT