Skip to main content
Module

x/scaffold/src/deps/types.ts>ScreamingSnakeCase

scaffold your next project with style and 💗
Latest
type alias ScreamingSnakeCase
import { type ScreamingSnakeCase } from "https://deno.land/x/scaffold@0.3.0/src/deps/types.ts";

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.

Examples

Example 1

import type {ScreamingSnakeCase} from 'type-fest';

const someVariable: ScreamingSnakeCase<'fooBar'> = 'FOO_BAR';
definition: Value extends string ? IsScreamingSnakeCase<Value> extends true ? Value : Uppercase<SnakeCase<Value>> : Value