artytext
Version:
A comprehensive utility library for text manipulation, slug generation, password generation, case conversion, and more. Works with both TypeScript and JavaScript.
43 lines • 1.13 kB
TypeScript
export interface PasswordOptions {
length?: number;
includeUppercase?: boolean;
includeLowercase?: boolean;
includeNumbers?: boolean;
includeSymbols?: boolean;
excludeSimilar?: boolean;
excludeAmbiguous?: boolean;
}
export interface SlugOptions {
separator?: string;
lowercase?: boolean;
removeSpecialChars?: boolean;
maxLength?: number;
}
export interface RandomOptions {
min?: number;
max?: number;
length?: number;
charset?: string;
}
export type CaseType = 'lowercase' | 'uppercase' | 'camelCase' | 'kebab-case' | 'snake_case' | 'pascalCase' | 'titleCase' | 'sentenceCase';
export interface TextCaseOptions {
type: CaseType;
preserveWords?: boolean;
}
export interface TruncateOptions {
length: number;
suffix?: string;
preserveWords?: boolean;
separator?: string;
}
export interface MaskOptions {
pattern: string;
placeholder?: string;
reverse?: boolean;
}
export interface FormatOptions {
type: 'phone' | 'credit-card' | 'ssn' | 'zip' | 'currency';
format?: string;
locale?: string;
}
//# sourceMappingURL=index.d.ts.map