@visulima/string
Version:
Functions for manipulating strings.
17 lines (16 loc) • 663 B
TypeScript
import { b as CaseOptions, c as ConstantCase } from "../packem_shared/types.d-fhe030jX.js";
import "../packem_shared/types.d-CmNvyl4l.js";
/**
* Converts a string to CONSTANT_CASE.
* @example
* ```typescript
* constantCase("foo bar") // => "FOO_BAR"
* constantCase("foo-bar") // => "FOO_BAR"
* constantCase("foo_bar") // => "FOO_BAR"
* constantCase("XMLHttpRequest") // => "XML_HTTP_REQUEST"
* constantCase("AJAXRequest") // => "AJAX_REQUEST"
* constantCase("QueryXML123String") // => "QUERY_XML_123_STRING"
* ```
*/
declare const constantCase: <T extends string = string>(value?: T, options?: CaseOptions) => ConstantCase<T>;
export { constantCase as default };