Skip to content

Files

Latest commit

329743b · Mar 8, 2024

History

History
20 lines (14 loc) · 363 Bytes

snake-case.md

File metadata and controls

20 lines (14 loc) · 363 Bytes
category
String Operation

SnakeCase

Replace the camelCase or PascalCase string with snake_case.

Usage

import type { SnakeCase } from '@utype/core'

// Expect: "foo_bar_baz"
type FooBarBaz = SnakeCase<"fooBarBaz">
// Expect: "foo_bar_baz"
type FooBarBaz2 = SnakeCase<"FooBarBaz">