Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
900 B
Text
28 lines
900 B
Text
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;
|