UNPKG

everyutil

Version:

A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.

12 lines (11 loc) 301 B
/** * Detects repeating sequences or structural patterns in an array. * @author @dailker * @template T * @param {T[]} array * @returns {{pattern: T[], repeats: number} | null} */ export declare function detectPattern<T>(array: T[]): { pattern: T[]; repeats: number; } | null;