UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

20 lines 607 B
//#region src/array/isShallowEqual.d.ts /** * `isShallowEqual(array, other)` * * Returns `true` if `array` and `other` have the same length and their elements are equal using shallow comparison, otherwise returns `false`. * * ```ts * isShallowEqual([1, 2, 3], [1, 2, 3]); // true * ``` * * ```ts * pipe([1, 2, 3], isShallowEqual([1, 2, 3])); // true * ``` */ declare const isShallowEqual: { <T, U extends T>(source: readonly U[]): (target: readonly T[]) => target is U[]; <T, U extends T>(target: readonly T[], source: readonly U[]): target is U[]; }; //#endregion export { isShallowEqual };