mesh-fetcher
Version:
A Node.js package for fetching data from multiple APIs with enhanced features.
21 lines (20 loc) • 652 B
TypeScript
import { ObjectUtilOptions } from '../types';
/**
* Creates a deep clone of an object or array, maintaining circular references
* and preserving special object types like Date, RegExp, Map, Set, and Error.
*
* @template T - The type of the object to clone
* @param {T} obj - The object to clone
* @param {ObjectUtilOptions} [options] - Options for cloning behavior
* @returns {T} A deep clone of the input object
*
* @example
* ```typescript
* const obj = {
* date: new Date(),
* nested: { arr: [1, 2, 3] }
* };
* const clone = deepClone(obj);
* ```
*/
export declare function deepClone<T>(obj: T, options?: ObjectUtilOptions): T;