UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

25 lines (23 loc) 549 B
import { dfdlT } from "@monstermann/dfdl"; import { titleCase } from "string-ts"; //#region src/string/titleCase.ts /** * `titleCase(target)` * * Converts `target` string to Title Case format. * * ```ts * titleCase("hello world"); // "Hello World" * titleCase("hello-world"); // "Hello World" * ``` * * ```ts * pipe("hello world", titleCase()); // "Hello World" * pipe("hello-world", titleCase()); // "Hello World" * ``` */ const titleCase$1 = dfdlT((target) => { return titleCase(target); }, 1); //#endregion export { titleCase$1 as titleCase };