import type { SlugifyOptions } from "../types.js"; /** * Convert strings to URL-friendly slugs with customizable options. * This is an enhanced utility beyond standard Lodash. * * @param string - The string to slugify * @param options - The slugify options * @returns Returns the slugified string * * @example * slugify('Hello World!'); * // => 'hello-world' * * slugify('Café & Restaurant', { replacement: '_', lower: false }); * // => 'Cafe_Restaurant' * * slugify(' Multiple Spaces ', { strict: true }); * // => 'multiple-spaces' */ export declare function slugify(string?: string, options?: SlugifyOptions): string; /** * Truncate text by word count instead of characters. * This is an enhanced utility beyond standard Lodash. * * @param string - The string to truncate * @param maxWords - Maximum number of words * @param omission - The string to indicate text is omitted * @returns Returns the truncated string * * @example * truncateWords('The quick brown fox jumps over the lazy dog', 5); * // => 'The quick brown fox jumps...' * * truncateWords('Hello world', 5); * // => 'Hello world' * * truncateWords('One two three four five six', 3, ' [more...]'); * // => 'One two three [more...]' */ export declare function truncateWords(string?: string, maxWords?: number, omission?: string): string; /** * Truncates string if it's longer than the given maximum string length. * The last characters of the truncated string are replaced with the omission string which defaults to "...". * * @param string - The string to truncate * @param options - The options object * @returns Returns the truncated string * * @example * truncate('hi-diddly-ho there, neighborino'); * // => 'hi-diddly-ho there, neighbo...' * * truncate('hi-diddly-ho there, neighborino', { * 'length': 24, * 'separator': ' ' * }); * // => 'hi-diddly-ho there,...' * * truncate('hi-diddly-ho there, neighborino', { * 'length': 24, * 'separator': /,? +/ * }); * // => 'hi-diddly-ho there...' * * truncate('hi-diddly-ho there, neighborino', { * 'omission': ' [...]' * }); * // => 'hi-diddly-ho there, neig [...]' */ export declare function truncate(string?: string, options?: { length?: number; omission?: string; separator?: string | RegExp; }): string; /** * Removes leading and trailing whitespace or specified characters from string. * * @param string - The string to trim * @param chars - The characters to trim * @returns Returns the trimmed string * * @example * trim(' abc '); * // => 'abc' * * trim('-_-abc-_-', '_-'); * // => 'abc' */ export declare function trim(string?: string, chars?: string): string; /** * Removes trailing whitespace or specified characters from string. * * @param string - The string to trim * @param chars - The characters to trim * @returns Returns the trimmed string * * @example * trimEnd(' abc '); * // => ' abc' * * trimEnd('-_-abc-_-', '_-'); * // => '-_-abc' */ export declare function trimEnd(string?: string, chars?: string): string; /** * Removes leading whitespace or specified characters from string. * * @param string - The string to trim * @param chars - The characters to trim * @returns Returns the trimmed string * * @example * trimStart(' abc '); * // => 'abc ' * * trimStart('-_-abc-_-', '_-'); * // => 'abc-_-' */ export declare function trimStart(string?: string, chars?: string): string; /** * The inverse of `escape`; this method converts the HTML entities * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * @param string - The string to unescape * @returns Returns the unescaped string * * @example * unescape('fred, barney, & pebbles'); * // => 'fred, barney, & pebbles' */ export declare function unescape(string?: string): string;