/** * A no-operation function that accepts any arguments and returns any value. * * @param args any arguments * @returns any value */ export declare const noop: (...args: any[]) => any; /** * Generates a random ID. * * Creates a random ID string using Math.random(). * * @returns random ID string */ export declare const generateId: () => string; /** * Repeats something N times and returns an array of the results. * * @param fn function to repeat * @param n number of times to repeat * @returns array of results * * @example * nTimes(() => createEl('span'), 3) // [span, span, span] * nTimes(() => Math.random(), 5) // [0.123, 0.456, 0.789, 0.123, 0.456] * nTimes((i) => (i + 1) * 2, 3) // [2, 4, 6] */ export declare const nTimes: (fn: (iteration: number) => T, n: number) => T[]; /** * Enhanced key generation that handles object property ordering, * circular references, and non-serializable values with unique IDs. * * This function provides more reliable key generation than JSON.stringify * by handling edge cases like circular references, consistent object key ordering, * and various JavaScript types. * * **Non-serializable types get unique instance IDs:** * - Functions → `fn:_abc123` (unique per function instance) * - Symbols → `sym:_abc123` (unique per symbol instance) * - Errors → `e:_abc123` (unique per error instance) * - WeakMap → `wm:_abc123` (unique per instance) * - WeakSet → `ws:_abc123` (unique per instance) * - Circular refs → `circ:_abc123` (unique per object) * * @param args - The arguments to generate a key from * @returns A string key suitable for caching * * @example * ```typescript * const key = serializer([{a: 1, b: 2}, "test", 123]); * // Returns: '{"a":1,"b":2}|test|123' * * const key2 = serializer([new Date(1000), /test/i]); * // Returns: 'd:1000|r:/test/i' * * // Functions get unique IDs * const fn1 = () => {}; * const fn2 = () => {}; * serializer([fn1]) !== serializer([fn2]); // true * serializer([fn1]) === serializer([fn1]); // true * ``` */ export declare const serializer: (args: unknown[]) => string;