@web3r/flowerkit
Version:
Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).
15 lines (14 loc) • 487 B
text/typescript
export type TIsItemsEqualArgs = Parameters<typeof isItemsEqual>;
export type TIsItemsEqualReturn = ReturnType<typeof isItemsEqual>;
/**
* Checks if items of given Array is same
* @template T
* @param {Array<T>} arr source Array
* @returns {boolean}
* @example
* // How to check if all records are equal in an array?
* const arr = [ 1, 1, 1 ];
* const isSame = isItemsEqual(arr);
* console.log(isSame); // => true
*/
export declare const isItemsEqual: <T>(arr: T[]) => boolean;