persona-community-5/.pnpm-store/v3/files/43/7306160272b238ce0cc304542a4f7f5f2c02fd4a68c045fbde4bc634e4c137a491af065506f84e4cb7f1ab189c8ea551138c47c742ed260ef620c3a9caee9b
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

29 lines
900 B
Plaintext

import type {DefaultDelimiterCaseOptions} from './delimiter-case';
import type {ApplyDefaultOptions} from './internal';
import type {SnakeCase} from './snake-case';
import type {WordsOptions} from './words';
/**
Convert a string literal to screaming-snake-case.
This can be useful when, for example, converting a camel-cased object property to a screaming-snake-cased SQL column name.
@example
```
import type {ScreamingSnakeCase} from 'type-fest';
const someVariable: ScreamingSnakeCase<'fooBar'> = 'FOO_BAR';
const someVariableNoSplitOnNumbers: ScreamingSnakeCase<'p2pNetwork', {splitOnNumbers: false}> = 'P2P_NETWORK';
```
@category Change case
@category Template literal
*/
export type ScreamingSnakeCase<
Value,
Options extends WordsOptions = {},
> = Value extends string
? Uppercase<SnakeCase<Value, ApplyDefaultOptions<WordsOptions, DefaultDelimiterCaseOptions, Options>>>
: Value;