UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

21 lines (20 loc) 418 B
/** * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @since 5.12.0 * @category Util * @param prefix The value to prefix the ID with. * @returns Returns the unique ID. * @see [[random]] * @example * * ```js * uniqueId('contact_') * // => 'contact_104' * * uniqueId() * // => '105' * ``` */ export declare function uniqueId(prefix?: string): string; export default uniqueId;