Files
openpanel/packages/core/src/interfaces/textTransformers.ts
Stefan Pejcic 8496a83edb fork refine
2024-02-05 10:23:04 +01:00

21 lines
500 B
TypeScript

export type TextTransformers = {
/**
* Convert a camelized/dasherized/underscored string into a humanized one
* @example
* humanize("some_name") => "Some name"
*/
humanize?: (text: string) => string;
/**
* Pluralize a word
* @example
* plural('regex') => "regexes"
*/
plural?: (word: string) => string;
/**
* Singularize a word
* @example
* singular('singles') => "single"
*/
singular?: (word: string) => string;
};