import type { Arr } from '@toolbox-ts/types/defs/array'; export interface NormalizeArrayOptions { deduplicate?: boolean; } export interface NormalizeSentenceOptions { capitalizeFirst?: boolean; endPunctuation?: string; } /** * Cleans an array of strings: * - Trims whitespace from each string. * - Filters out empty strings and non-string values. * - Returns an empty array if the input is undefined or empty. * - Optionally deduplicates the array. * @example * ```ts * normalize.array([' foo ', 'bar', '', 123, null, undefined, 'baz ']) * // ['foo', 'bar', 'baz'] * normalize.array(undefined) // [] * normalize.array([]) // [] * normalize.array(['a', 'b', 'a'], true) // ['a', 'b'] * ``` */ export declare const array: (a?: unknown, { deduplicate }?: NormalizeArrayOptions) => (A[number] & string)[]; /** * Normalizes a string into a well-formed sentence: * - Trims whitespace from the string. * - Capitalizes the first letter (optional, default: true). * - Ensures the string ends with proper punctuation (optional, default: '.'). * - Returns an empty string if the input is not a valid string. * @example * ```ts * normalize.sentence(' hello world ') // 'Hello world.' * normalize.sentence('hello world', { endPunctuation: '!' }) // 'Hello world!' * normalize.sentence('Hello world.') // 'Hello world.' * ``` */ export declare const sentence: (str: unknown, { capitalizeFirst, endPunctuation }?: { capitalizeFirst?: boolean | undefined; endPunctuation?: string | undefined; }) => string;