stringzy
Version:
A versatile string manipulation library providing a range of text utilities for JavaScript and Node.js applications.
9 lines (8 loc) • 442 B
TypeScript
/**
* Creates chunks of string based on a given chunk size
* @param text - Input string
* @param Number - Size of the chunk. Must be a positive integer. Defaults to 1.
* @returns An array of all the chunks created from the string based on the specified chunk size.
* @throws Error if input text is not a string or chunk size is not a positive integer.
*/
export declare function splitChunks(text: string, chunkSize?: Number): string[];