UNPKG

mini-id

Version:

A lightweight and customizable unique ID generator with zero collisions.

15 lines (14 loc) 768 B
/** * Generate a unique ID. * * This function generates a unique identifier using a combination of a timestamp, * random bytes, and a machine ID. You can customize the generated ID by providing * a prefix, a suffix, and/or a custom length. * * @param {string | number} [input] - A **string** prefix or a **number** custom length. * @param {string | number} [secondInput] - A **string** suffix or a **number** custom length (overrides first input if both are numbers). * @param {number} [thirdInput] - A **number** custom length (if only length is required). * * @returns {string} - The generated unique ID with optional customizations. */ export declare function miniId(input?: string | number, secondInput?: string | number, thirdInput?: number): string;