UNPKG

hybrid-id-generator

Version:

A powerful hybrid ID generator that combines timestamps, machine IDs, random bits, and sequence numbers to create globally unique identifiers. Features collision prevention, Base62 encoding, and optional ID expiry tracking, ideal for distributed systems a

18 lines (17 loc) 622 B
"use strict"; // src/constants.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.Base64Chars = exports.Base32Chars = exports.Base62Chars = void 0; /** * Characters used for Base62 encoding (0-9, a-z, A-Z). */ exports.Base62Chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Characters used for Base32 encoding (A-Z, 2-7). * RFC 4648 standard. */ exports.Base32Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'; /** * Characters used for Base64 encoding (A-Z, a-z, 0-9, +, /). */ exports.Base64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';