UNPKG

hey-api-builders

Version:

A custom plugin for @hey-api/openapi-ts that generates mock data builders with a lightweight custom runtime, Zod integration, or static mock generation.

34 lines 1.07 kB
/** * String utilities for code generation */ /** * Converts a string to PascalCase * @param str - Input string * @returns PascalCase string */ export declare function toPascal(str: string): string; /** * Creates a safe TypeScript type name by removing invalid characters * @param name - Input name * @returns Safe type name */ export declare function safeTypeName(name: string): string; /** * Normalizes common type name prefixes (UI -> Ui, API -> Api, etc.) * @param typeName - Input type name * @returns Normalized type name */ export declare function normalizeTypeName(typeName: string): string; /** * Checks if a property name is a valid JavaScript identifier * @param key - Property name to check * @returns True if valid identifier */ export declare function isValidIdentifier(key: string): boolean; /** * Makes a property name safe for code generation * @param key - Property name * @returns Quoted key if needed, otherwise raw key */ export declare function safePropName(key: string): string; //# sourceMappingURL=string-utils.d.ts.map