UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

18 lines 609 B
//#region src/predicate/isEqual.d.ts /** * Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison. * * @param a - The first value to compare. * @param b - The second value to compare. * @returns `true` if the values are equal, otherwise `false`. * * @example * isEqual(1, 1); // true * isEqual({ a: 1 }, { a: 1 }); // true * isEqual(/abc/g, /abc/g); // true * isEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true * isEqual([1, 2, 3], [1, 2, 3]); // true */ declare function isEqual(a: any, b: any): boolean; //#endregion export { isEqual };