UNPKG

@evolplus/evo-utils

Version:
14 lines (13 loc) 760 B
export declare enum NamingConvention { CamelCase = "camelCase", SnakeCase = "snake_case", KebabCase = "kebab-case", PascalCase = "PascalCase", UpperSnakeCase = "UPPER_SNAKE_CASE", UpperKebabCase = "UPPER-KEBAB-CASE" } export type NamingConverter = (name: string, from: NamingConvention, to: NamingConvention) => string; export type ObjectConverter = (obj: any) => any; export declare function convertName(name: string, from: NamingConvention, to: NamingConvention): string; export declare function convertObject(obj: any, from: NamingConvention, to: NamingConvention): any; export declare function createConverter(fields: string[] | readonly string[], from: NamingConvention, to: NamingConvention, reversed?: boolean): ObjectConverter;