UNPKG

@synotech/utils

Version:

a collection of utilities for internal use

12 lines (11 loc) 329 B
/** * This method validates email address * @module truncate * @param {string} str - a string to truncate * @return {string} {String} a truncated string * @example * * truncate('This is a long string', 10) // returns 'This is a...' * */ export declare function truncate(str: string, limit?: number): string;