mesh-fetcher
Version:
A Node.js package for fetching data from multiple APIs with enhanced features.
20 lines (19 loc) • 795 B
TypeScript
import { ObjectUtilOptions } from '../types';
/**
* Performs a deep equality comparison between two values.
* Handles special object types like Date, RegExp, Map, Set, and Error.
*
* @template T - The type of the values to compare
* @param {T} a - First value to compare
* @param {T} b - Second value to compare
* @param {ObjectUtilOptions} [options] - Options for comparison behavior
* @returns {boolean} True if the values are deeply equal, false otherwise
*
* @example
* ```typescript
* const obj1 = { date: new Date(2024, 0, 1), nested: { arr: [1, 2] } };
* const obj2 = { date: new Date(2024, 0, 1), nested: { arr: [1, 2] } };
* const areEqual = deepEqual(obj1, obj2); // true
* ```
*/
export declare function deepEqual<T>(a: T, b: T, options?: ObjectUtilOptions): boolean;