UNPKG

@web3r/flowerkit

Version:

Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).

16 lines (15 loc) 545 B
export type TIsStrInKebabCaseArgs = Parameters<typeof isStrInKebabCase>; export type TIsStrInKebabCaseReturn = ReturnType<typeof isStrInKebabCase>; /** * Checks if a string is in kebab-case. * Rules: * Lowercase letters separated by single hyphens * No leading or trailing hyphen * * @param {string} str Source string * @returns {boolean} True if string is kebab-case * @throws {TypeError} If str is not a string * @example * isStrInKebabCase("good-kebab"); // true */ export declare const isStrInKebabCase: (str: string) => boolean;