froebel
Version:
TypeScript utility library
8 lines (7 loc) • 401 B
TypeScript
import type { StringCase, Suffix } from "./types";
/**
* Returns `str` suffixed with `suffix`. Same case and type behavior as
* {@link prefix}.
*/
declare const suffix: <T0 extends string, T1 extends string, C extends void | StringCase = void>(str: T1, suffix: T0, caseMod?: C | undefined) => `${T1}${C extends "snake" ? "_" : ""}${C extends "camel" ? Capitalize<T0> : T0}`;
export default suffix;