@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
18 lines • 703 B
TypeScript
/**
* Repeats a value a specified number of times.
* @template T
* @param {T} value - The value to repeat.
* @param {number} count - The number of times to repeat.
* @returns {T[]} Array of repeated values.
* @throws {TypeError|RangeError} If count is invalid.
*/
export default function repeat<T>(value: T, count: number): T[];
/**
* Repeats a string a specified number of times.
* @param {string} value - The string to repeat.
* @param {number} count - The number of times to repeat.
* @returns {string} The repeated string.
* @throws {TypeError|RangeError} If count is invalid.
*/
export default function repeat(value: string, count: number): string;
//# sourceMappingURL=repeat.d.ts.map