UNPKG

mesh-fetcher

Version:

A Node.js package for fetching data from multiple APIs with enhanced features.

11 lines (10 loc) 465 B
import { TruncateOptions } from '../types'; /** * Truncates a string to a specified length and adds a replacement string. * @param str - The string to truncate * @param maxLength - The maximum length of the string * @param options - Configuration options for truncation * @returns The truncated string * @throws {Error} If str is null or undefined */ export declare function truncateString(str: string, maxLength: number, options?: TruncateOptions): string;