UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

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