canvacard
Version:
Powerful image manipulation package for beginners.
11 lines • 591 B
TypeScript
export = truncateText;
/**
* @name truncateText
* @description Truncates text to a specified length and adds an ellipsis if necessary.
* @param {string} text The text to be truncated.
* @param {number} [limit=25] The maximum length of text before truncation (default is 25).
* @param {boolean} [fromEnd=false] If true, truncation will be performed from the end of the text (default is false).
* @returns {string} The original or truncated text.
*/
declare function truncateText(text: string, limit?: number, fromEnd?: boolean): string;
//# sourceMappingURL=truncateText.utils.d.ts.map