/** * Miscellaneous utility helpers. * * @module bquery/core/utils/misc */ /** * Creates a stable unique ID for DOM usage. * * @param prefix - Optional prefix for the ID (default: 'bQuery') * @returns A unique identifier string * * @example * ```ts * const id = uid('modal'); // 'modal_x7k2m9p' * ``` */ export declare function uid(prefix?: string): string; /** * Delays execution for a specified number of milliseconds. * * @param ms - Milliseconds to delay * @returns A promise that resolves after the delay * * @example * ```ts * await sleep(1000); // Wait 1 second * console.log('Done!'); * ``` */ export declare function sleep(ms: number): Promise; /** * Safely parses a JSON string, returning a default value on error. * * @template T - The expected type of the parsed value * @param json - The JSON string to parse * @param fallback - The default value if parsing fails * @returns The parsed value or the fallback * * @example * ```ts * parseJson('{"name":"bQuery"}', {}); // { name: 'bQuery' } * parseJson('invalid', {}); // {} * ``` */ export declare function parseJson(json: string, fallback: T): T; /** * Checks for emptiness across common value types. * * @param value - The value to check * @returns True if the value is empty (null, undefined, empty string, empty array, or empty object) * * @example * ```ts * isEmpty(''); // true * isEmpty([]); // true * isEmpty({}); // true * isEmpty(null); // true * isEmpty('hello'); // false * isEmpty([1, 2]); // false * ``` */ export declare function isEmpty(value: unknown): boolean; //# sourceMappingURL=misc.d.ts.map