/** * Creates a unique id with letters, numbers, but no spaces or special characters. By default, the length is 6 characters. Works in the browser and NodeJS (and other runtimes). Handy, but not cryptographically secure. * * * @example * Basic usage * ```js * // Generate a default length id * const id = getId(); * console.log(id); // e.g., 'a1B2c3' * ``` * * @example * Custom length id * ```js * const id = getId(10); * console.log(id); // e.g., 'a1B2c3D4e5' * ``` * * @param length - The length of the generated id. Default is 6. */ export default function getId(length?: number): string;