Rocky_Mountain_Vending/.pnpm-store/v10/files/fb/cc1f2494a6752c9990d3d5b2b361aec7d6a62449fbd8ae4abea38bc42dbfa8d1284c5ac47e0173365a5d7d6b349563ce811d3e74afd305cdb21662e1008fb2
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

45 lines
1.1 KiB
Text

import type {DefaultDelimiterCaseOptions, DelimiterCase} from './delimiter-case';
import type {ApplyDefaultOptions} from './internal';
import type {WordsOptions} from './words';
/**
Convert a string literal to snake-case.
This can be useful when, for example, converting a camel-cased object property to a snake-cased SQL column name.
@example
```
import type {SnakeCase} from 'type-fest';
// Simple
const someVariable: SnakeCase<'fooBar'> = 'foo_bar';
const noSplitOnNumbers: SnakeCase<'p2pNetwork'> = 'p2p_network';
const splitOnNumbers: SnakeCase<'p2pNetwork', {splitOnNumbers: true}> = 'p_2_p_network';
// Advanced
type SnakeCasedProperties<T> = {
[K in keyof T as SnakeCase<K>]: T[K]
};
interface ModelProps {
isHappy: boolean;
fullFamilyName: string;
foo: number;
}
const dbResult: SnakeCasedProperties<ModelProps> = {
'is_happy': true,
'full_family_name': 'Carla Smith',
foo: 123
};
```
@category Change case
@category Template literal
*/
export type SnakeCase<
Value,
Options extends WordsOptions = {},
> = DelimiterCase<Value, '_', ApplyDefaultOptions<WordsOptions, DefaultDelimiterCaseOptions, Options>>;