@utilify/core
Version:
Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B
10 lines • 395 B
TypeScript
/**
* Returns all subarrays of a given size (window) from an array.
* @template T
* @param {T[]} array - The array to window.
* @param {number} [size=1] - The window size.
* @returns {T[][]} Array of windows.
* @throws {TypeError} If array is not an array or size is invalid.
*/
export default function aperture<T>(array: T[], size?: number): T[][];
//# sourceMappingURL=aperture.d.ts.map