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.
11 lines (10 loc) • 411 B
TypeScript
/**
* Rotates the array in chunks of N elements.
* @author @dailker
* @template T
* @param {T[]} array - The array to rotate.
* @param {number} chunkSize - Size of each chunk.
* @param {number} count - Number of chunk rotations (positive=right, negative=left).
* @returns {T[]} Rotated array.
*/
export declare function arrayRotateChunks<T>(array: T[], chunkSize: number, count: number): T[];