UNPKG

@empathyco/x-components

Version:
37 lines 1.05 kB
/** * Util used to return true if the string is empty, undefined or null. * * @param str - String value. * @returns Returns true if str is an empty string, undefined or null. * @public */ export declare function isStringEmpty(str?: string | null): boolean; /** * Util to transform string a into kebab case. * * @example * Transforms `camelCase` into `camel-case` * Transforms `PascalCase` into `pascal-case` * Transforms `snake_case` into `snake-case` * Transforms `space space multispaces` into `space-space-multiplespaces` * Transforms `kebab-case` into `kebab-case` * * @param str - String value. * @returns Returns the string in kebab case. * @public */ export declare function toKebabCase(str: string): string; /** * Util to capitalize a string . * * @example * Transforms `query` into `Query` * * @param str - String value. * * @returns Returns the string capitalized. * * @public */ export declare function capitalize<StrType extends string>(str: StrType): Capitalize<StrType>; //# sourceMappingURL=string.d.ts.map