@monstermann/fn
Version:
A utility library for TypeScript.
25 lines (23 loc) • 617 B
TypeScript
import { ConstantCase } from "string-ts";
//#region src/string/constantCase.d.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"
* ```
*/
declare const constantCase$1: {
(): <T extends string>(target: T) => ConstantCase<T>;
<T extends string>(target: T): ConstantCase<T>;
};
//#endregion
export { constantCase$1 as constantCase };