/** * General utility functions */ /** * Generate a unique cache key for a cargo */ export declare function generateCargoKey(expozr: string, cargo: string, version?: string): string; /** * Normalize URL by ensuring it ends with a slash */ export declare function normalizeUrl(url: string): string; /** * Join URL paths properly */ export declare function joinUrl(...parts: string[]): string; /** * Deep merge objects */ export declare function deepMerge>(target: T, ...sources: Partial[]): T; /** * Create a timeout promise */ export declare function createTimeout(ms: number): Promise; /** * Retry a function with exponential backoff */ export declare function retry(fn: () => Promise, attempts: number, delay: number, backoff?: number): Promise; /** * Check if code is running in browser environment */ export declare function isBrowser(): boolean; /** * Check if code is running in Node.js environment */ export declare function isNode(): boolean; /** * Get current timestamp */ export declare function timestamp(): number; /** * Format bytes to human readable string */ export declare function formatBytes(bytes: number, decimals?: number): string; /** * Debounce function calls */ export declare function debounce void>(func: T, delay: number): (...args: Parameters) => void; /** * Throttle function calls */ export declare function throttle void>(func: T, delay: number): (...args: Parameters) => void; /** * Create a promise that resolves after a delay */ export declare function sleep(ms: number): Promise; /** * Check if a value is empty (null, undefined, empty string, empty array, empty object) */ export declare function isEmpty(value: any): boolean; /** * Generate a random string */ export declare function randomString(length?: number): string; /** * Clamp a number between min and max values */ export declare function clamp(value: number, min: number, max: number): number; //# sourceMappingURL=general.d.ts.map