Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/07akioni/naming-convention-types


https://github.com/07akioni/naming-convention-types

Last synced: 28 days ago
JSON representation

Awesome Lists containing this project

README

        

# naming-convention-types

Validate naming convention of string type.

```ts
import {
ValidateUpperSnakeCase,
ValidateCamelCase
} from 'naming-convention-type'

ValidateUpperSnakeCase<'Foo'> // never
ValidateUpperSnakeCase<'FOO_BAR'> // 'FOO_BAR'

ValidateCamelCase<'Foo'> // never
ValidateCamelCase<'foo_bar'> // never
ValidateCamelCase<'fooBar'> // 'fooBar'
```