mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
21 lines
500 B
TypeScript
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;
|
|
};
|