UNPKG

@codeplaydata/datasus

Version:

This application decompress the datasus micro data and serve as a gateway class.

26 lines (25 loc) 898 B
import { Command } from "./Command.js"; /** * Utility to split a list of items into fixed-size chunks. * * This is used by the JobOrchestrator to partition file lists and control * the max number of concurrent jobs handled by the JobScheduler. */ export declare class SplitIntoChunks implements Command { protected chunkSize: number; /** * @param chunkSize Desired size of each chunk (number of items per chunk). */ private constructor(); /** * Factory method to create a splitter with a defined chunk size. * @param chunkSize Number of items per chunk. */ static define(chunkSize: number): SplitIntoChunks; /** * Splits the given array into chunks of the configured size. * @param arr List of items to be partitioned. * @returns An array of arrays (chunks) keeping original order. */ exec(arr: string[]): string[][]; }